Skip to content

Instantly share code, notes, and snippets.

@tonyseek
Last active August 29, 2015 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyseek/935f9366eb001da4f906 to your computer and use it in GitHub Desktop.
Save tonyseek/935f9366eb001da4f906 to your computer and use it in GitHub Desktop.
from operator import itemgetter
class Step(tuple):
location = property(itemgetter(0))
milestone = property(itemgetter(1))
step = Step(['nowhere', 'nothing'])
assert step.location == 'nowhere'
assert step.milestone == 'nothing'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment