[Tutor] Methods and classes
Chris Hengge
pyro9219 at gmail.com
Wed Sep 13 22:40:26 CEST 2006
Can anyone explain what I've been reading? I'm trying to understand why
many documents show:
def myMethod(vars):
or
class myClass(var):
and others show:
def myMetheod(self, vars)
or
class myClass(self, vars)
Either way seems to work fine, so I'm not sure what it happening.
Also, what is with the double underscores? (__init__ for example) is
this required? or a Pythonic naming convention? When and how to use?
I'm 'trying' to write clear pythonic code since in all reality it gives
a nice polish to the code when compared to writing c style.
Thanks.
More information about the Tutor
mailing list