Skip to content

Support iteration over enums with enum34 #1412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2017
Merged

Conversation

ilinum
Copy link
Contributor

@ilinum ilinum commented Jun 15, 2017

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