Skip to content

gh-137448: Add sort by key or value to dict obj #137446

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

Closed

Conversation

Stranger-Jie
Copy link

@Stranger-Jie Stranger-Jie commented Aug 6, 2025

Add an optional sort_dicts_by_key : bool at pprint.py, when pprint a dict obj.

@bedevere-app
Copy link

bedevere-app bot commented Aug 6, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

1 similar comment
@bedevere-app
Copy link

bedevere-app bot commented Aug 6, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@StanFromIreland
Copy link
Member

Hello, please create an issue with your rationale for this feature.

@Stranger-Jie
Copy link
Author

@StanFromIreland Thank you for the reminder. I create an issue #137448.

@skirpichev skirpichev changed the title Add sort by key or value to dict obj gh-137448: Add sort by key or value to dict obj Aug 6, 2025
@Stranger-Jie Stranger-Jie force-pushed the lib_pprint_add_sort_by_to_dict branch from 0bb95b4 to 81fc5f0 Compare August 6, 2025 09:37
@bedevere-app
Copy link

bedevere-app bot commented Aug 6, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@skirpichev
Copy link
Contributor

@Stranger-Jie, please avoid altering commit history (force-pushes, etc).

@Stranger-Jie
Copy link
Author

This is my first time submitting a PR for cpython, and I apologize for my actions. I hope this has not caused any serious consequences.

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.

3 participants