Craig Holmquist added the comment:

I may not have been clear before.  What I mean is, code like this:

for obj in get_objects():
    if obj.category == Cat.cat1:
        #do something
    elif obj.category == Cat.cat2:
        #do something else
    elif obj.category == Cat.cat3 or obj.category == Cat.cat4:
        #...

obj.category is already an instance of Cat, in other words.  The consumer is 
using it to determine what to do with each obj.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23486>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to