28 Apr
2013
28 Apr
'13
5:16 p.m.
Guido van Rossum wrote:
On Saturday, April 27, 2013, Greg Ewing wrote:
class Planet(Enum): MERCURY = (3.303e+23, 2.4397e6) VENUS = (4.869e+24, 6.0518e6) EARTH = (5.976e+24, 6.37814e6)
def __init__(self, mass, radius): self.mass = mass self.radius = radius
If you want something like this, doyou really have to inherit from Enum?
I suppose not, but the same could be said for cases where you want to add methods to enums, etc. -- Greg