The meaning of "=" (Was: tough-to-explain Python)
aahz at pythoncraft.com
Sun Jul 12 06:23:43 CEST 2009
In article <h3bagu$52m$4 at lust.ihug.co.nz>,
Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:
>In message <h37gv5$r81$1 at panix3.panix.com>, Aahz wrote:
>> It helps to remember that names and namespaces are in many
>> ways syntactic sugar for dicts or lists.
>Interesting, though, that Python insists on maintaining a distinction
Why do you say "insists"?
def __getitem__(self, key):
return getattr(self, key)
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"as long as we like the same operating system, things are cool." --piranha
More information about the Python-list