> My point is that I don't see the distinction between avoiding using dicts
> with well-known keys and wanting to access a dict with attribute access
> (which is where this started). Seems the same to me.
I think using dict with well-known keys is what makes people want dict
with attribute access.
On 3/24/2011 8:10 PM, Eugene Toder wrote:
Although we do something similar with namedtuple (instead of using a
dict), so it's not like we have a strict distinction.
Named tuple is a convenience to avoid creating boilerplate classes (or
resorting to use dict with well-known keys).
My point is
> Although we do something similar with namedtuple (instead of using a
> dict), so it's not like we have a strict distinction.
Named tuple is a convenience to avoid creating boilerplate classes (or
resorting to use dict with well-known keys). Names in named tuple are
not data, only values. In dict
> On Thu, Mar 24, 2011 at 10:50:51AM -0700, Guido van Rossum wrote:
>> The JSON use case seems to be driven because this is the way
>> JavaScript does things -- they don't distinguish between dicts and
>> objects.
>
>That's particular feature has a cure (or poison - for thos who don't
> want to
On Thu, Mar 24, 2011 at 10:50:51AM -0700, Guido van Rossum wrote:
> The JSON use case seems to be driven because this is the way
> JavaScript does things -- they don't distinguish between dicts and
> objects.
That's particular feature has a cure (or poison - for thos who don't
want to mix getat