[Python-Dev] New syntax for 'dynamic' attribute access (original) (raw)
Michael Foord fuzzyman at voidspace.org.uk
Wed Feb 14 00:55:46 CET 2007
- Previous message: [Python-Dev] New syntax for 'dynamic' attribute access
- Next message: [Python-Dev] New syntax for 'dynamic' attribute access
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Armin Rigo wrote:
Hi,
On Mon, Feb 12, 2007 at 12:38:27AM -0700, Neil Toronto wrote:
obj.*strexpression
x = *('variable%d' % n) f(a, b, *('keyword%d' % n) = c) class *('33strangename'): pass def *(funcname)(x, y, *(argname), *args, **kwds): pass import *modname as mymodule Are you for these uses or mocking them ? Some of them look interesting...
FWIW, at Resolver (75k lines of IronPython code currently) we use getattr / setattr almost as many as 8 times. (I was very surprised at how low that was.)
That said, when I explained the proposal to two of my colleagues both of them were very happy with the obj.[name] suggestion.
Michael Foord
Sorry for the noise,
Armin
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
- Previous message: [Python-Dev] New syntax for 'dynamic' attribute access
- Next message: [Python-Dev] New syntax for 'dynamic' attribute access
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]