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

Rewrite extender as a generator #104

Merged
merged 1 commit into from
Nov 17, 2021
Merged

Conversation

dbarbier
Copy link
Contributor

List comprehensions are faster than for-loops, but extender() computes
3 comprehension lists. Its return value is used only once, and can be
replaced by an iterable, extender() can be rewritten as a generator.
This avoids creation of temporary lists, while still being readable.

List comprehensions are faster than for-loops, but extender() computes
3 comprehension lists.  Its return value is used only once, and can be
replaced by an iterable, extender() can be rewritten as a generator.
This avoids creation of temporary lists, while still being readable.
@galleon galleon merged commit af7af84 into airbus:master Nov 17, 2021
@dbarbier dbarbier deleted the db/extender branch November 17, 2021 13: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