Python23: cannot inherit from bool?
Martin v. Löwis
martin at v.loewis.de
Thu Jan 16 05:13:07 EST 2003
Dale Strickland-Clark <dale at riverhall.NOTHANKS.co.uk> writes:
> >.... don't know the answer to that one, but is the non inheritance
> >property available to ordinary python if yes we could create leaf
> >classes.
>
> At the risk of sounding dim: what's a leaf class?
I think the OP meant this as a synonym for what others call "final"
classes, i.e. classes that cannot be used as a base class. The OP asks
whether it is possible to implement a Python class which gives an
error when it is used as a base. I believe the answer to that question
is "no".
Regards,
Martin
More information about the Python-list
mailing list