generic enum for python