Differences between Class(Object) and Class(Dict) for dictionary usage?
Ben Finney
ben+python at benfinney.id.au
Tue Apr 26 23:54:11 EDT 2016
Christopher Reimer <christopher_reimer at icloud.com> writes:
> If I'm using a dictionary to store variables for an object, and
> accessing the variable values from dictionary via property decorators
Why not use the built-in ‘dict’ type?
What does the new type do which isn't already better served by the
built-in ‘dict’ type?
(Note that “allow attribute-syntax access to dictionary items” does not
qualify as “better”, IMO; it qualifies as “needlessly confusing distinct
concepts”.)
> I haven't seen a good pro/con discussion on the Internet for using one
> over the other.
I haven't seen a good pro/con discussion of the use case you're trying
to address :-)
--
\ “I'd take the awe of understanding over the awe of ignorance |
`\ any day.” —Douglas Adams |
_o__) |
Ben Finney
More information about the Python-list
mailing list