Skip to content

Collections module reformatting and minor code refactoring #20772

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

Merged
merged 10 commits into from
Jun 11, 2020

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Jun 10, 2020

  • Code clean-up only. Overall logic and performance are unchanged.
  • Use f-strings instead of format() calls.
  • Use modern, zero-argument form of super()
  • Simplify Counter.__repr__ logic to take advantage of order preserving dicts.
  • Avoid duplicating the map slicing logic already present in copy().
  • Switch direction of if-test to match the style in the rest of the module.

@rhettinger rhettinger changed the title Minor code refactoring Minor code refactoring and reformatting Jun 10, 2020
@rhettinger rhettinger changed the title Minor code refactoring and reformatting Collections module reformatting and minor code refactoring Jun 10, 2020
@rhettinger rhettinger merged commit 31d1779 into python:master Jun 11, 2020
@miss-islington
Copy link
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-20798 is a backport of this pull request to the 3.9 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants