Python Classes

Lamonte Harris pyth0nc0d3r at
Tue Aug 28 07:04:09 CEST 2007

How come you have to set the initialized created variables to equal the
parameters, shouldn't that be default?

class testing:
         def __init__(self,testing):
                   self.testing = testing
x = testing("testing")
print x.testing

How come self.testing = testing

Can someone explain that in more detail, just confused on why you have to
set it up like that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list