<div dir="ltr">On 4 February 2013 10:53, João Bernardo <span dir="ltr"><<a href="mailto:jbvsmo@gmail.com" target="_blank">jbvsmo@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div>Hi, about this enum/const thing, The use case I like more is a class where you know all the<br>instances and not just a sequence of names.<br></div>Particularly It would be nice to have custom attributes and methods besides the value and the name.<br>


<br></div>I have my own implementation with a basic api somewhat borrowed from flufl.enum (plus a lot of other stuff),<br>but with this kind of support: <a href="https://github.com/jbvsmo/makeobj" target="_blank">https://github.com/jbvsmo/makeobj</a></div>
</div></div></div></div></blockquote><div><br></div><div style>I considered it, and in fact you could almost do it with my implementation by using a custom subclass of EnumValue (except trying it has just exposed a design flaw with the whole _EnumProxy bit). Works if you create the enum in the same module as EnumValues, fails otherwise. Going to have to have a rethink.</div>
<div style><br></div><div style>Tim Delaney</div></div></div></div>