Question about subclassing - version 2
onurb at xiludom.gro
Fri Sep 8 11:38:52 CEST 2006
Frank Millman wrote:
> bearophileHUGS at lycos.com wrote:
>> There aren't abstract classes in Python. They are all
> I use the term 'abstract class' in the abstract sense :-)
> Say I have three classes where 90% of the attributes and methods are
> common. It makes sense to create a base class with these attributes and
> methods, and turn each of the three classes into a subclass which
> inherits from the base class and overrides the bits that are unique to
> each one.
> This is what I call an abstract class. Maybe there is a more correct
Depends if instanciating this base class would make any sense.
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