Newbie Question regarding __init__()
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Fri Jul 31 23:31:25 EDT 2009
En Fri, 31 Jul 2009 22:53:47 -0300, Simon <dciphercomputing at gmail.com>
escribió:
> So should the dcObject class include the "self" as well since I have
> not defined an __init__ method in dcCursor?
Every method that you define takes "self" as its first argument.
Every method that you want to call on the current instance must be
qualified by self.methodname(argu, ments) -- it is not different from
anotherobject.methodname(...)
Every attribute that you want to access from the current instance must be
qualified too: self.attributename
There is no implicit self/this in Python as in other languages.
--
Gabriel Genellina
More information about the Python-list
mailing list