Skip to main content

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.

Metadata

Release files for enum34 1.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for enum34 1.1.6
File Size Uploaded
enum34-1.1.6.zip 44.8 kB Details
enum34-1.1.6.tar.gz 40.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for enum34 1.1.6
File Interpreter ABI Platform
enum34-1.1.6-py3-none-any.whl Python 3 none any Details
enum34-1.1.6-py2-none-any.whl Python 2 none any Details

Total release size: 109.7 kB

Release files / enum34-1.1.6.zip

Download URL enum34-1.1.6.zip
Size 44.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2d81cbbe0e73112bdfe6ef8576f2238f2ba27dd0d55752a776c41d38b7da2850
BLAKE2b-256 checksum
How to use checksums
e826a6101edcf724453845c850281b96b89a10dac6bd98edebc82634fccce6a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / enum34-1.1.6.tar.gz

Download URL enum34-1.1.6.tar.gz
Size 40.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1
BLAKE2b-256 checksum
How to use checksums
bf3e31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / enum34-1.1.6-py3-none-any.whl

Download URL enum34-1.1.6-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
644837f692e5f550741432dd3f223bbb9852018674981b1664e5dc339387588a
BLAKE2b-256 checksum
How to use checksums
af42cb9355df32c69b553e72a2e28daee25d1611d2c0d9c272aa1d34204205b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / enum34-1.1.6-py2-none-any.whl

Download URL enum34-1.1.6-py2-none-any.whl
Size 12.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
6bd0f6ad48ec2aa117d3d141940d484deccda84d4fcd884f5c3d93c23ecd8c79
BLAKE2b-256 checksum
How to use checksums
c5dbe56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.1.10

3 release files

1.1.9

3 release files

1.1.8

3 release files

This release

1.1.6 This release

4 release files

1.1.5

3 release files

1.1.4

3 release files

1.1.3

3 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0

2 release files

0.9.23

2 release files

0.9.22

2 release files

0.9.20

2 release files

0.9.19

1 release file

0.9.18

1 release file

0.9.17

1 release file

0.9.16

1 release file

0.9.15

1 release file

0.9.14

1 release file

0.9.13

1 release file

0.9.12

1 release file

0.9.11

1 release file

0.9.1

1 release file

0.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page