[Python-ideas] Shorthand syntax for get/set/delattr (was Re: Dict-like object with property access)

Cameron Simpson cs at zip.com.au
Sun Feb 5 03:17:44 CET 2012

On 05Feb2012 10:20, Nick Coghlan <ncoghlan at gmail.com> wrote:
| In short, I think proposals for dedicated syntax for dynamic attribute
| access are misguided - instead, such efforts should go into enhancing
| vars() to return objects that support *full* dict-style access to the
| underlying object's attribute namespace (with descriptor protocol
| support and all).


_Where_ do you people find the time to write these well thought out posts?

I'm very much for making vars() better supported (the docs have caveats
about assigning to it). All the syntax suggestions I've seen look
cumbersome or ugly and some are actively misleading to my eye (did I really
see an "<-" in there?)

 I see my random sig quote picker has worked well again:-)

Cameron Simpson <cs at zip.com.au> DoD#743

A strong conviction that something must be done is the parent of many
bad measures.   - Daniel Webster

More information about the Python-ideas mailing list