subclassing float (or not)

Thomas Heller theller at python.net
Fri Feb 22 14:54:32 EST 2002


I'm currently porting my own rewrite of Konrad Hinsen's PhysicalValue
module to Python 2.2.
Basically a PhysicalValue instance is a float conbined with a unit.
Should I subclass float or should I not? What would I gain by doing
this (except maybe some memory savings when I use __slots__)?

Thomas





More information about the Python-list mailing list