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

call sum() without an intermediary list following PEP 289 recommendations #129

Merged
merged 1 commit into from Oct 25, 2021
Merged

Conversation

adbar
Copy link
Contributor

@adbar adbar commented Oct 25, 2021

Just a simple syntax issue, sum() doesn't need prior casting of iterables to a list, a generator expression is better from a memory standpoint, see PEP 289.

@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2021

Codecov Report

Merging #129 (5a8d489) into master (f1cf425) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #129   +/-   ##
=======================================
  Coverage   90.35%   90.35%           
=======================================
  Files          11       11           
  Lines        1171     1171           
=======================================
  Hits         1058     1058           
  Misses        113      113           
Impacted Files Coverage Δ
charset_normalizer/cd.py 96.49% <100.00%> (ø)
charset_normalizer/md.py 96.69% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1cf425...5a8d489. Read the comment docs.

@Ousret Ousret changed the title sum() without unnecessary [] call sum() without an intermediary list following PEP 289 recommendations Oct 25, 2021
@Ousret
Copy link
Owner

Ousret commented Oct 25, 2021

Thanks.

@Ousret Ousret merged commit b89913a into Ousret:master Oct 25, 2021
@Ousret Ousret mentioned this pull request Nov 24, 2021
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.

None yet

3 participants