Python Forum
why is my dictionary not recognized as such
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why is my dictionary not recognized as such
#1
I am still a newbie but learning fast. However, Python is still surprising me in strange ways. Here is my code
supported_drivers = {"SQLite" : 1,
                    "Sybase" : 3,
                    "SQLserver" : 7,
                    "Oracle" : 8 ,
                    "MongoDB" : 10,
                    "DynamoDB" : 11
                    }
print (vars(supported_drivers))
and here is the result:
Traceback (most recent call last):
File "Z:\projects\xxx\yyy.py", line 58, in <module>
print (vars(supported_drivers))
TypeError: vars() argument must have __dict__ attribute.

OK, so why is my, seemingly a dictionary, not a dictionary?

Thank you all
ZA
Reply


Messages In This Thread
why is my dictionary not recognized as such - by zatlas1 - Jan-13-2019, 04:33 AM
RE: Dictionnaries - Equality - by zatlas1 - Jan-13-2019, 04:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  is import cointegration_analysis a recognized module mitcht33 1 456 Nov-06-2023, 09:29 PM
Last Post: deanhystad
  The term 'pip' is not recognized as the name of a cmdlet, function michaelnicol 1 655 Jul-16-2023, 11:12 PM
Last Post: deanhystad
  Index Function not recognized in Python 3 Peter_B_23 1 1,277 Jan-08-2023, 04:52 AM
Last Post: deanhystad
  TypeError: size; expecting a recognized type filling string dict a11_m11 0 2,554 Feb-10-2020, 08:26 AM
Last Post: a11_m11
  matplotlib isn't recognized after installation Pavel_47 5 2,871 Sep-18-2019, 07:01 PM
Last Post: snippsat
  how do i get y to be recognized in this comprehension? Skaperen 5 3,158 Aug-26-2019, 07:43 PM
Last Post: Skaperen
  pyserial-master installed bbut not recognized elwolv1 0 2,002 Jan-04-2019, 08:37 PM
Last Post: elwolv1
  How do I calculate the smallest value that is recognized as a difference when compari AFoeee 1 2,807 Oct-28-2018, 10:48 PM
Last Post: Gribouillis
  'videodigest' is not recognized as an internal or external command MM2018 2 2,812 Oct-12-2018, 02:43 PM
Last Post: MM2018
  Class attribute not recognized\working J125 1 5,418 Dec-19-2016, 01:05 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020