

def __new__(cls, name, bases, attrs):
    if ('_lookup' not in attrs):
        lookup = {
            
        }
        for (k, v) in six.iteritems(attrs):
            if isinstance(v, six.integer_types):
                lookup.setdefault(v, k)
        attrs['_lookup'] = lookup
    return super(EnumerationMeta, cls).__new__(cls, name, bases, attrs)

dataset/ETHPy150Open theatlantic/django-cropduster/cropduster/standalone/metadata.py EnumerationMeta.__new__/original