In article <[EMAIL PROTECTED]>, Alexander Kozlovsky <[EMAIL PROTECTED]> wrote:
> Hello all! > I have small silly syntax suggestion (SSSS) > > In many cases, keys in dictionary-like objects are strings, > and moreover - valid Python identifiers. Something like: > > foo["bar"]["baz"].x = y > > How about small syntactic sugar: > > foo!bar!baz.x = y Ugh. Syntactic sugar like that leads to language obesity. Anyway, you can already do what you want with just a little bit of work. Define a class (perhaps a subclass of dict, if you like) with a __getattr__ method. Then you can just do foo.bar.baz.x = y with no changes needed to the language. -- http://mail.python.org/mailman/listinfo/python-list