<div dir="ltr">Would it make sense to use the `enum34` package, which is a backport of teh enum package from py3k?<div><br></div><div>Alex</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 9, 2013 at 7:37 PM, Adam Young <span dir="ltr"><<a href="mailto:ayoung@redhat.com" target="_blank">ayoung@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">While Python 3 has enumerated types, Python 2 does not, and the standard package to provide id, Flufl.enum, is not yet part of our code base. Is there any strong objection to including Flufl.enum?<br>
<br>
<a href="http://pythonhosted.org/flufl.enum/" target="_blank">http://pythonhosted.org/flufl.<u></u>enum/</a><br>
<br>
It makes for some very elegant code, especially for enumerated integer types.<br>
<br>
For an example See ScopeType in<br>
<br>
<a href="https://review.openstack.org/#/c/55908/4/keystone/contrib/revoke/core.py" target="_blank">https://review.openstack.org/#<u></u>/c/55908/4/keystone/contrib/<u></u>revoke/core.py</a><br>
<br>
Line 62.<br>
<br>
the getter/setter in RevokeEvent do not need to do any conditional logic if passed either an integer or a ScopeType.<br>
<br>
<br>
______________________________<u></u>_________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.<u></u>org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
"The people's good is the highest law." -- Cicero<br><div>GPG Key fingerprint: 125F 5C67 DFE9 4084</div></div>
</div>