<br><br><div class="gmail_quote">On 27 July 2011 13:44, M.-A. Lemburg <span dir="ltr"><<a href="mailto:mal@egenix.com">mal@egenix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Raymond Hettinger wrote:<br>
><br>
> On Jul 24, 2011, at 6:19 PM, Jack Diederich wrote:<br>
><br>
>> On Sun, Jul 24, 2011 at 8:33 PM, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>
>>> For enums, I think we should just pick a solution. I'm in favor of<br>
>>> Barry Warsaw's version, flufl.enum.<br>
>><br>
>> I don't care for enums but enough other people do that I wouldn't mind<br>
>> including a blessed implemenation.<br>
><br>
> I also don't care for enums and recommend against adding them to the language.<br>
> IMO, it is something that makes good sense in statically compiled languages<br>
> and is unnecessary for us. Not to mention, we already have several ways to do it<br>
> (module and class namespaces for example).<br>
><br>
> Also, when this idea came up in the past, it tended to get shot down because<br>
> the various use cases suggested differing implementations with different<br>
> features.<br>
><br>
> I also urge caution because Python has already stopped being a small language.<br>
> Enums are especially problematic because they will pop up everywhere.<br>
> You won't have the option of ignoring them.<br>
<br>
</div>+1<br>
<div class="im"><br></div></blockquote><div><br>Actually, as they should behave exactly like constants you should entirely be able to "ignore" them (to the same extent you ignore the existing constants anyway).<br>
<br>Whether they're exposed at the module level, or grouped in a single namespace (the container), or both, is a stylistic issue for module authors. I've seen plenty of Python modules that group constants as class attributes for convenience even without an enum in the standard library. This proposal just makes those more useful and doesn't add any overhead for *using* them.<br>
<br>I think a lot of the objections come from perceived negative experience of Enums in other languages (not particularly aimed at you here MAL). When we discussed this on python-dev several developers were much happier with the proposal if we called them NamedConstants and GroupedConstants rather than Enums.<br>
<br>Michael<br><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="im">
> Python has achieved an amazing adoption rate without enums.<br>
> Most people just don't need them. Many, large and clean apps have<br>
> been built without them. Those that have found did were typically<br>
> able to implement them easily with the existing toolset.<br>
<br>
</div>--<br>
Marc-Andre Lemburg<br>
eGenix.com<br>
<br>
Professional Python Services directly from the Source (#1, Jul 27 2011)<br>
>>> Python/Zope Consulting and Support ... <a href="http://www.egenix.com/" target="_blank">http://www.egenix.com/</a><br>
>>> mxODBC.Zope.Database.Adapter ... <a href="http://zope.egenix.com/" target="_blank">http://zope.egenix.com/</a><br>
>>> mxODBC, mxDateTime, mxTextTools ... <a href="http://python.egenix.com/" target="_blank">http://python.egenix.com/</a><br>
________________________________________________________________________<br>
<br>
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::<br>
<br>
<br>
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48<br>
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg<br>
Registered at Amtsgericht Duesseldorf: HRB 46611<br>
<a href="http://www.egenix.com/company/contact/" target="_blank">http://www.egenix.com/company/contact/</a><br>
<div><div></div><div class="h5">_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><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>