<br><br><div class="gmail_quote">On 29 July 2011 01:03, Michael Foord <span dir="ltr"><<a href="mailto:fuzzyman@gmail.com">fuzzyman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">On 29 July 2011 00:58, Raymond Hettinger <span dir="ltr"><<a href="mailto:raymond.hettinger@gmail.com" target="_blank">raymond.hettinger@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On Jul 28, 2011, at 4:42 PM, Michael Foord wrote:<br>
<br>
><br>
> Why not Colors.inject(__name__)?<br>
<br>
</div>Because enums aren't import enough to warrant introducing little atrocities into the language.<br>
<br></blockquote></div><div><br>Uh ?? It's the same code just taking a module name instead of requiring you to pull the module out of sys.modules yourself. It's not an atrocity at all.<br></div></div></blockquote>
<div><br>To make it clear, the one-line-works-everywhere alternative people will use is:<br><br> Colors.inject(sys.modules[__name__])<br><br>Which is clearly worse.<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;">
<div class="gmail_quote"><div><font color="#888888"><br>Michael<br><br></font></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<br>
Raymond<br>
<br>
<br>
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.</blockquote></div></div><br><br clear="all"><div><div></div><div class="h5"><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>
</div></div></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>