[Tutor] __init__.py
Joseph Quigley
cpu.crazy at gmail.com
Mon May 23 01:54:56 CEST 2005
I've seen many (python) "plugins" (some located in site-packages [windows
here]) with the name __init__.py.
What's their use?
class foo:
def __init__:
print "this starts first"
def foo1():
print "this comes later. Init initializes the chain of functions in this
class
Now, i've never used a program (i can't seem to grasp all the self, and
other things in OOP yet) with __init__ but I know what __init__ does in a
class, not as a file name.
I'm asking this out of curiosity, not for help.
JQ
More information about the Tutor
mailing list