AlFire <[EMAIL PROTECTED]> wrote: >Diez B. Roggisch wrote: >>> >>> Q: why function got dictionary? What it is used for? >> >> because it is an object, and you can do e.g. >> > >you mean an object in the following sense? > > >>> isinstance(g,object) >True > >where could I read more about that?
This is a very useful feature. As just one example, the CherryPy web server framework lets you define a class to handle one directory in a web site, where each page is mapped to member functions. However, you also need to include support functions that should not be exposed as web pages. To do that, you just add an "exposed" attribute to the function: class MyWebPage: ... def index( self, ... ): pass index.exposed = 1 def notExposed( self, ... ): pass def request( self, ... ): pass request.exposed = 1 -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list