Ben Finney wrote:
Scott David Daniels <scott.dani...@acm.org> writes:
Scott David Daniels wrote:
class Initialized(ClassBase):
@classmethod
def _init_class(class_):
class_.a, class_.b = 1, 2
super(Initialized, class_)._init_class()
Mea culpa: Here super is _not_ a good idea,
[…]
Why is ‘super’ not a good idea here?
class Initialized(ClassBase):
@classmethod
def _init_class(class_):
class_.a, class_.b = 1, 2
ClassBase._init_class()
What makes this implementation better than the one using ‘super’?
a possible answer:
- explicit >> implicit
I'm not sure this is the correct one though :)
JM
--
http://mail.python.org/mailman/listinfo/python-list