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

Wrong prep #62

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Wrong prep #62

wants to merge 10 commits into from

Conversation

thorunna
Copy link
Collaborator

Handling for wrong prepositions.

given a set of variants"""

# Get rid of argument variants in verbs:
variants = list([x for x in variants if not x.isdigit()])
Copy link
Member

Choose a reason for hiding this comment

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

Either list() or [] are superfluous, only one of the two is required

Copy link
Member

Choose a reason for hiding this comment

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

...in fact the isdigit() filter is done twice. This could be:

realvars = [x for x in variants if not x.isdigit() and x not in SKIPVARS]

entirely dropping the for loop.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you, done!

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