Failed Conditions
Pull Request — master (#2076)
by Abdeali
02:11
created

coalib/misc/Enum.py (4 issues)

1
def enum(*sequential, **named):
2
    enums = dict(zip(sequential, range(len(sequential))), **named)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable named does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable sequential does not seem to be defined.
Loading history...
3
    str_dict = enums.copy()
4
    enums['reverse'] = dict((value, key) for key, value in enums.items())
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable value does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable key does not seem to be defined.
Loading history...
5
    enums['str_dict'] = str_dict
6
7
    return type('Enum', (), enums)
8