[Python-ideas] Dict-like object with property access
p.f.moore at gmail.com
Wed Feb 1 14:05:44 CET 2012
On 1 February 2012 11:33, Joao S. O. Bueno <jsbueno at python.org.br> wrote:
> Still, there should be something with a closing token.
> Try to imagine three of these in a chain, if the syntax is a colon:
> name1:name2:name3:name4 -> which could mean either of:
> name1:(name2:(name3:name4)), (name1:name2):(name3.name4)
> and so on - (not to mention other expressions involving names, though these
> would be less ambiguous due to to operator precedence.
No more so than a.b.c.d.e
I would expect a:b to behave exactly the same as a.b, Except that it
uses getitem rather than getattr under the hood (was that the
proposal? I'm completely confused by now as to what this new syntax is
intended to achieve...)
But I don't like the idea in any case, so I remain -1 on the whole proposal.
More information about the Python-ideas