Skip to content

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.

3 participants