<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 29, 2013 at 2:59 PM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In the Planet example we saw the possibility of specifying arguments to enum item __init__:<br>
<br>
class Planet(Enum):<br>
    MERCURY = (3.303e+23, 2.4397e6)<br>
    VENUS   = (4.869e+24, 6.0518e6)<br>
    EARTH   = (5.976e+24, 6.37814e6)<br>
    MARS    = (6.421e+23, 3.3972e6)<br>
    JUPITER = (1.9e+27,   7.1492e7)<br>
    SATURN  = (5.688e+26, 6.0268e7)<br>
    URANUS  = (8.686e+25, 2.5559e7)<br>
    NEPTUNE = (1.024e+26, 2.4746e7)<br>
<br>
    def __init__(self, mass, radius):<br>
        self.mass = mass       # in kilograms<br>
        self.radius = radius   # in meters<br>
<br>
Do we want to support this?<br></blockquote><div><br></div><div>I'm -1, and this is yet another bad sign of conflating enums with classes. If planets want to have attributes and behaviors, let them be normal classes. If they want a PlanetId *enum member*, that's OK, but there's no need to intermix the two.<br>

<br></div><div>Besides, did we not agree that the only acceptable *members* for enums are going to be descriptors? In the above, mass & radius are not descriptors.<br></div><div><br></div><div>Eli<br><br></div></div>
<br>
</div></div>