On Wed, Feb 27, 2013 at 1:09 AM, Terry Reedy <tjre...@udel.edu> wrote: > On 2/25/2013 2:48 PM, Antoine Pitrou wrote: >> >> On Mon, 25 Feb 2013 11:34:35 -0800 >> Ethan Furman <et...@stoneleaf.us> wrote: >>> >>> Antoine, question for you: >>> >>> Do you think enums from different groupings should compare equal? >> >> >> Equality should be mostly transitive so, yes, I think they should. > > > Or if they do not, then they should neither compare equal to ints. One or > the other, take your pick, or make both choices available.
I'm already working on too many different things to take a serious run at a labelled values proposal, but it is avoiding precisely this kind of problem that makes me favour a permissive solution that *doesn't* define any new behaviour for the instance, aside from changing the result of repr() and the contents of pickles. (You could potentially combine it with a "sensitive values" proposal that ensured repr() and other operations only displayed the label without showing the contents at all - this is also potentially useful for labelling large strings that may otherwise overwhelm debug output). Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ 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