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

Filter and validator for handling lists #233

Merged
merged 3 commits into from
Jun 21, 2019
Merged

Conversation

jace
Copy link
Member

@jace jace commented Jun 21, 2019

No description provided.

@jace jace requested a review from iambibhas June 21, 2019 11:15
"""
def strip_each_inner(value):
if value:
return [sline for sline in [line.strip(chars) for line in value] if sline]
Copy link
Contributor

@iambibhas iambibhas Jun 21, 2019

Choose a reason for hiding this comment

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

Would using return filter(None, [line.strip(chars) for line in value]) be a bit faster or slower?

Copy link
Member Author

Choose a reason for hiding this comment

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

Function calls are always slower.

@jace jace merged commit 939cfa1 into master Jun 21, 2019
@jace jace deleted the form-list-filter-validator branch June 21, 2019 12:56
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