On 04/12/2013 08:37 AM, Barry Warsaw wrote:
On Apr 12, 2013, at 11:29 AM, R. David Murray wrote:

You get that automatically if you return NotImplemented from the
comparison methods.  I don't think you should be explicitly raising
NotImplemented.

Oh darn, this doesn't work for Python 2.7.  You don't care for PEP 435, but
flufl.enum will have to raise the TypeError explicitly for consistency.

Yeah, 2.x has everything ordered; returning NotImplemented only works for the non-comparison methods (such as add, subtract, etc.); one of the nice things about 3.x. :)

--
~Ethan~
_______________________________________________
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