On 5/14/2013 7:16 AM, Ethan Furman wrote:
Thank you for being persistent. You are correct, the value should be an IntET (at least, with a custom __new__ ;).

You know, when you look at something you wrote the night before, and have no idea what you were trying to say, you know you were tired. Ignore my parenthetical remark.

Gladly. And we now have several more days to have forgotten what we were doing/talking about...

Okay, the value is now an IntET, as expected and appropriate.

Maybe.

I upgraded my ref435.py from yours at https://bitbucket.org/stoneleaf/ref435 (and your test file there references enum.py which is not there).

My demo1.py still doesn't work. The first 4 lines are fine, but not the last two. I still cannot do a lookup (via __call__ syntax) by either int or IntET value.

You have my old misnamed NEI class in your test file now, and the tests you use with it work... but you don't have a lookup test. My demo1 does, and that fails.

After instrumenting Enum.__new__ it seems that the member.value is still the constructor parameters...

Maybe I picked up the wrong version of your code?

Oh and demo1.py has leftover __new__ and __init__ definitions for NIE, modeled after your earlier suggestions. Leaving them in causes everything to be named 'temp'. Taking them out makes things not work differently.



_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to