<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>
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