Skip to main content

Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4

Project description

An enumeration is a set of symbolic names (members) bound to unique, constant values. Within an enumeration, the members can be compared by identity, and the enumeration itself can be iterated over.

from enum import Enum

class Fruit(Enum):

apple = 1 banana = 2 orange = 3

list(Fruit) # [<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>]

len(Fruit) # 3

Fruit.banana # <Fruit.banana: 2>

Fruit[‘banana’] # <Fruit.banana: 2>

Fruit(2) # <Fruit.banana: 2>

Fruit.banana is Fruit[‘banana’] is Fruit(2) # True

Fruit.banana.name # ‘banana’

Fruit.banana.value # 2

Repository and Issue Tracker at https://bitbucket.org/stoneleaf/enum34.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enum34-1.1.8.tar.gz (28.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

enum34-1.1.8-py3-none-any.whl (1.5 kB view details)

Uploaded Python 3

enum34-1.1.8-py2-none-any.whl (1.5 kB view details)

Uploaded Python 2

File details

Details for the file enum34-1.1.8.tar.gz.

File metadata

  • Download URL: enum34-1.1.8.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.2rc1+

File hashes

Hashes for enum34-1.1.8.tar.gz
Algorithm Hash digest
SHA256 36db3d880f7a9a4989b1dfba625381a82294d1d3cfaa62bbbf18b594e195fa31
MD5 cbc5966a840d398462b1a95644d4df61
BLAKE2b-256 a79a909b721496b6f3e7776345c250d55cbdbcb1302fb42cf79de0d929af74c1

See more details on using hashes here.

File details

Details for the file enum34-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: enum34-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 1.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.2rc1+

File hashes

Hashes for enum34-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cffbadfe6cd17ea2408adb8bb21b12bd30dd0d15de90af44e1dd4b60435993e2
MD5 a6b21640773c7e00070b4391cdd03343
BLAKE2b-256 286eff8465d953994e0df78d636ac7ed76b10e52e9777f947124f8f2951cbb5d

See more details on using hashes here.

File details

Details for the file enum34-1.1.8-py2-none-any.whl.

File metadata

  • Download URL: enum34-1.1.8-py2-none-any.whl
  • Upload date:
  • Size: 1.5 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.2rc1+

File hashes

Hashes for enum34-1.1.8-py2-none-any.whl
Algorithm Hash digest
SHA256 075e6c23fbf537eaf379ebe17dbcb65a4f2d2ecd03ac5a3ac534c313afbdfa33
MD5 4665603a4c452a8a3b59bbe19647cbe4
BLAKE2b-256 f04355233ddb2e5f8fc6288147155faac30c404f039a7177c662044148da0989

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page