Recursive method
Fredrik Lundh
fredrik at pythonware.com
Wed Jul 14 11:12:22 EDT 1999
Ralph Gauges <ralph.gauges at eml.villa-bosch.de> wrote:
> You are absolutely right. So far I had some methods in my
> class and made the whole gui right inside the class
> definition. This must have created some problems with
> namespaces and 'self'. Now I moved the whole gui creation
> inside the __init__ method and now 'self' works.
> Now I have one more question: Why is there no 'self' right
> inside the class definition?
probably because there is no instance when the
class definition is executed...
("class" is a *statement*, not a declaration, and
is executed when the script is run. see:
http://www.python.org/doc/current/ref/class.html
for details. "def" is also a statement, btw...)
</F>
More information about the Python-list
mailing list