<div dir="ltr">> Eli, it would be nice if you stopped with this claim.<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
I'm not advocating "not having a convenience syntax", I'm advocating<br>
having a convenience syntax which is *class-based* rather than<br>
function-based.<br>
<br>
Debuggers are beside the point: there are two kinds of "convenience<br>
syntax" on the table; one allows pickling by construction, one<br>
requires an ugly hack which may not solve all cases (and which may<br>
apparently make Jython / IronPython mildly unhappy). Why you insist<br>
on ignoring the former and imposing the latter is beyond me.<br></blockquote></div><br></div><div class="gmail_extra">I'm not trying to belittle our class-based suggestion. I just think there are two separate issues here, and I was focusing on just one of them for now. The one I've been focusing on is how to make the function-based convenience syntax work with pickling in the vast majority of interesting cases. This appears to be possible by using the same pattern used by namedtuple, and even better by encapsulating this pattern formally in stdlib so it stops being a hack (and may actually be useful for other code too).<br>

<br>The other issue is your proposal to have a class-based convenience syntax akin to (correct me if I got this wrong):<br><br></div><div class="gmail_extra">class Animal(Enum):<br></div><div class="gmail_extra">  __values__ = 'cat dog'<br>

<br></div><div class="gmail_extra">This is obviously a matter of preference (and hence bikeshedding), but this still looks better to me:<br><br></div><div class="gmail_extra">Animal = Enum('Animal', 'cat dog')<br>

<br></div><div class="gmail_extra">It has two advantages:<br><br></div><div class="gmail_extra">1. Shorter<br></div><div class="gmail_extra">2. Parallels namedtuple, which is by now a well known and widely used construct<br>

<br></div><div class="gmail_extra">On the other hand, your proposal has the advantage that it allows pickles without hacks in the implementation.<br><br></div><div class="gmail_extra">Did I sum up the issues fairly?<br><br>

</div><div class="gmail_extra">I don't know what to decide here. There's no clear technical merit to decide on one against the other (IMHO!), it's a matter of preference. Hopefully Guido will step in and save us from our misery ;-)<br>

<br></div><div class="gmail_extra">Eli<br><br></div><div class="gmail_extra"><br><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><br></div></div>