Is my thinking Pythonic?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Thu Aug 21 14:34:52 EDT 2008
En Thu, 21 Aug 2008 14:31:02 -0300, Craig Allen <callen314 at gmail.com>
escribi�:
> generally, I name the members in the Class definition and set them to
> None there...
>
> class Car:
> speed = None
> brand = None
>
> def __init__():
> self.speed = defaultspeed #alternately, and more commonly, get
> this speed as a initializer argument
> self.brand = defaultbrand
This isn't a good idea as discussed in this recent thread
http://groups.google.com/group/comp.lang.python/browse_thread/thread/b4001042e59bcc29/
--
Gabriel Genellina
More information about the Python-list
mailing list