UNKNOWN
Project description
example of use:
- class FOO(MetaEnum):
BAZ = (0, ‘bazik’) BAR = 1
>>> FOO.BAZ 0 >>> FOO.BAR 1 >>> FOO.BAZ_name 'BAZ' >>> FOO.BAZ_verbose 'bazik' >>> FOO.get_verbose(FOO.BAZ) 'bazik' >>> FOO.get_verbose(FOO.BAR) None >>> FOO.as_choices() [(0, 'bazik'), (1, None)]>>> FOO.by_name('BAZ') 0 >>> FOO.by_verbose('bazik') 1
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
MetaEnum-1.0.tar.gz
(1.9 kB
view hashes)