[Python-ideas] Interrogate alternate namespace keyword and concept

Antoine Pitrou solipsis at pitrou.net
Sat Aug 15 13:19:37 CEST 2009


Prozacgod <prozacgod at ...> writes:
> 
> My main motivation most likely is just that it would open up some very 
> interesting meta-programing or dynamic programming opportunities, variables 
> that exists entirely programmatically without the prefix of 
> object_instance.foo, surely just syntactical sugar to some (or even most) -

This sounds very PHP-like (doing indirections like $$foo because there isn't any
powerful introspection or OO system, and many things (e.g. functions, classes)
aren't first-class objects and can't be passed as parameters). I don't think
Python should grow something like that; instead people should learn more
structured ways of accessing data. getattr() and friends are powerful enough for
playing access tricks.

(in other words: -1 from me)





More information about the Python-ideas mailing list