Instances behaviour

bruno at modulix onurb at xiludom.gro
Fri Dec 2 04:43:56 EST 2005


Inyeol Lee wrote:
(snip)

>>>>class A(object):
>>>>...     def __init__(self, foo):
>>>>...             if self.__class__ is A:
>>>>...                     raise TypeError("A is base class.")   


s/TypeError/NotImplementedError/
s/base class/abstract class/


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list