<br><br><div class="gmail_quote">On 29 July 2011 01:27, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Fri, Jul 29, 2011 at 9:58 AM, Raymond Hettinger<br>
<div class="im"><<a href="mailto:raymond.hettinger@gmail.com">raymond.hettinger@gmail.com</a>> wrote:<br>
</div><div class="im">> P.S.  I used the term "language" instead of stdlib because I expect<br>
> enums to be like decorators and context managers in that they<br>
> will be used almost everywhere -- you won't be able to ignore them.<br>
> Effectively, they will become a core language feature.<br>
<br>
</div>I agree with this - and I think it's the named value aspect that will<br>
make them so pervasive. It's why I keep hitting on<br>
collections.namedtuple as a source of inspiration - it adds as little<br>
as possible to ordinary tuples to provide the additional benefits.<br>
Enums, on the other hand, come with a lot of excess baggage that many<br>
potential use cases simply don't need.<br>
<br></blockquote><div><br>I agree "named values" would get us *most* of the value, and would both be less contentious and provide a common building block for third party libraries to build interesting and perhaps esoteric uses on.<br>
<br>I *like* grouped named values (I think they make nice apis to read and use when used appropriately), but hey-ho. <br><br>Michael<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Cheers,<br>
Nick.<br>
<font color="#888888"><br>
--<br>
Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>
</font></blockquote></div><br><br clear="all"><br>-- <br><pre cols="72"><a href="http://www.voidspace.org.uk/" target="_blank">http://www.voidspace.org.uk/</a><br><br>May you do good and not evil<br>May you find forgiveness for yourself and forgive others<br>
May you share freely, never taking more than you give.<br>-- the sqlite blessing <a href="http://www.sqlite.org/different.html" target="_blank">http://www.sqlite.org/different.html</a></pre>
<br>