Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enum34

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enum34

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

  • 1.1.10
  • PyPI
  • Socket score

Maintainers
1

enum --- support for enumerations

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc