On Friday 07 May 2010, Martin Aspeli elucidated thus:
>> Ah, I didn't realise it supported __getitem__ as well as
>> __getattr__. Does it also support .get()?
> No, sorry. Although rare, I didn't want to hide a real <get/>
Yeah, makes sense.
To be honest, I think it'd have been better to choose either
attribute or dict notation. Having both is confusing and leads to
divergent practices and documentation. Zope 2 made that mistake with
various things (like request keys) and it was never a good idea.
FWIW, I like the choice. Key notation is useful for cycling through a
list of keys, and attribute notation is nice when you know your list of
attributes before hand, and makes for cleaner code. But you are right:
it does require a coding standard to be in place.
Part-Time System Admin/Programmer
PGP Key: http://pgp.mit.edu/