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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4