[Python-ideas] Dict-like object with property access
Masklinn
masklinn at masklinn.net
Mon Jan 30 20:39:08 CET 2012
On 2012-01-30, at 20:23 , Ethan Furman wrote:
> Sure you do -- as soon as 'something' can be passed in via a variable:
That's what getattr is for, isn't it?
The issue I have is that, to me, string keys say "arbitrary" and attributes say "enumerated set". Using one for the other? Wreaks that information. I like that Python (and most languages) makes the distinction, and I don't think Javascript and Lua should be emulated on this point.
More information about the Python-ideas
mailing list