Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107704 > unrolled thread

Re: Differences between Class(Object) and Class(Dict) for dictionary usage?

Started byBen Finney <ben+python@benfinney.id.au>
First post2016-04-27 13:54 +1000
Last post2016-04-27 13:54 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Differences between Class(Object) and Class(Dict) for dictionary usage? Ben Finney <ben+python@benfinney.id.au> - 2016-04-27 13:54 +1000

#107704 — Re: Differences between Class(Object) and Class(Dict) for dictionary usage?

FromBen Finney <ben+python@benfinney.id.au>
Date2016-04-27 13:54 +1000
SubjectRe: Differences between Class(Object) and Class(Dict) for dictionary usage?
Message-ID<mailman.139.1461729264.32212.python-list@python.org>
Christopher Reimer <christopher_reimer@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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web