Last active
August 29, 2015 14:23
-
-
Save refi64/5fad06f7a70e6420bb8c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def fuzzyfinder(p, l): | |
return map(lambda t: t[0], sorted(filter(lambda t: all(map(lambda x: x != -1, t[1])), map(lambda s: (s,map(s.find, p)), l)), key=lambda t: t[1])) |
Python 3 gives the error
yeap, python 3 gives an error::
TypeError: unorderable types: map() < map()
BTW, i think it has a big problem, for repeat character in p
, find() return the same pos.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@noodlebreak Well, I typed this on a phone in a web REPL. ;)
Also, I don't get an error!?