Skip to content
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

Futurize for py2/3 compatibility #1

Merged
merged 3 commits into from
Oct 10, 2019
Merged

Futurize for py2/3 compatibility #1

merged 3 commits into from
Oct 10, 2019

Conversation

nraval1729
Copy link

@nraval1729 nraval1729 requested a review from a team October 10, 2019 11:18
@@ -59,4 +59,4 @@ def html2list(x, b=0):
elif c in string.whitespace: out.append(cur+c); cur = ''
else: cur += c
out.append(cur)
return filter(lambda x: x is not '', out)
return [x for x in out if x is not '']
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is neat! I always thought it's more pythonic to use a list comprehension rather than filter!

@nraval1729 nraval1729 merged commit 6dbea31 into master Oct 10, 2019
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