On 17 avr, 16:06, AlFire <[EMAIL PROTECTED]> wrote: > 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?
A: everything (or almost) in Python is an object. Including functions, classes, modules etc. -- http://mail.python.org/mailman/listinfo/python-list