why function got dictionary

AlFire spamgrinder.trylater at gmail.com
Thu Apr 17 10:06:08 EDT 2008


Hi,

I am seeking an explanation for following:

Python 2.5.2 (r252:60911, Apr  8 2008, 21:49:41)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> def g(): return
...
 >>> g.__dict__
{}

Q: why function got dictionary? What it is used for?


Thx, Andy



More information about the Python-list mailing list