Skip to content

Support iteration over enums with enum34 - #1412

Merged
matthiaskramm merged 2 commits into
python:masterfrom
ilinum:enum34
Jun 19, 2017
Merged

matthiaskramm merged 2 commits into
python:masterfrom
ilinum:enum34

Conversation

@ilinum

@ilinum ilinum commented Jun 15, 2017

Copy link
Copy Markdown
Contributor

This PR's goal is to support the following in python 2:

from enum import Enum

class Colors(Enum):
   RED = 0
   BLUE = 1

for color in Colors:
  print(color.name)

Iteration over enums in python3 was supported in different PR. (this PR is pretty much a copy of the python 3 one)

@matthiaskramm
matthiaskramm merged commit d5eb32d into python:master Jun 19, 2017
@ilinum
ilinum deleted the enum34 branch August 3, 2017 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants