Craig Holmquist added the comment: It seems like performance is drastically improved by doing this:
class Category(Enum): tiny = 1 medium = 2 large = 3 tiny = Category.tiny medium = Category.medium In other words, resolving Category.tiny and Category.medium is what's slow. The comparison itself is very fast. ---------- _______________________________________ 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