Last active
December 19, 2015 04:18
-
-
Save sloria/5895782 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Meh | |
def match(self, items): | |
for each in items: | |
if each.match(self): | |
return each | |
# Is this supposed to reach the end? Is this a bug? | |
# Better | |
def match(self, items): | |
for each in items: | |
if each.match(self): | |
return each | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment