<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-text-html" lang="x-western">
<div class="moz-cite-prefix">On 04/29/2013 03:33 PM, Ethan Furman
wrote:<br>
</div>
<blockquote cite="mid:517EF535.1030001@stoneleaf.us" type="cite">On
04/29/2013 03:25 PM, Eli Bendersky wrote: <br>
<blockquote type="cite">On Mon, Apr 29, 2013 at 2:59 PM, Ethan
Furman wrote: <br>
<blockquote type="cite"> <br>
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>
<br>
Besides, did we not agree that the only acceptable *members*
for enums are going to be descriptors? In the above, mass
& <br>
radius are not descriptors. <br>
</blockquote>
Good point. We can leave that out, then.<br>
</blockquote>
<br>
self.__mass = mass<br>
<br>
And surely we were discussing members of the class, not members of
instances.<br>
<br>
<br>
<i>/arry</i><br>
</div>
</body>
</html>