We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = 'https://github.com/serhiy-storchaka' closed_at = <Date 2015-03-26.06:57:06.939> created_at = <Date 2015-03-25.07:54:56.505> labels = ['type-feature', 'library'] title = 'Fix pprint of OrderedDict' updated_at = <Date 2015-03-26.06:57:06.937> user = 'https://github.com/serhiy-storchaka'
bugs.python.org fields:
activity = <Date 2015-03-26.06:57:06.937> actor = 'serhiy.storchaka' assignee = 'serhiy.storchaka' closed = True closed_date = <Date 2015-03-26.06:57:06.939> closer = 'serhiy.storchaka' components = ['Library (Lib)'] creation = <Date 2015-03-25.07:54:56.505> creator = 'serhiy.storchaka' dependencies = [] files = ['38683'] hgrepos = [] issue_num = 23775 keywords = ['patch'] message_count = 4.0 messages = ['239234', '239285', '239308', '239309'] nosy_count = 6.0 nosy_names = ['fdrake', 'rhettinger', 'python-dev', 'berker.peksag', 'serhiy.storchaka', 'alexei.romanov'] pr_nums = [] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue23775' versions = ['Python 3.5']
The text was updated successfully, but these errors were encountered:
Currently pprint prints the repr of OrderedDict if it fits in one line, and prints the repr of dict if it is wrapped.
>>> import collections, pprint >>> pprint.pprint(collections.OrderedDict([(4, 3), (2, 1)])) OrderedDict([(4, 3), (2, 1)]) >>> pprint.pprint(collections.OrderedDict([(4, 3), (2, 1)]), width=25) {4: 3, 2: 1}
Proposed patch makes pprint always produce an output compatible with OrderedDict's repr.
>>> pprint.pprint(collections.OrderedDict([(4, 3), (2, 1)]), width=25) OrderedDict([(4, 3), (2, 1)])
Sorry, something went wrong.
LGTM. Added minor comments on Rietveld.
New changeset afc21da5935f by Serhiy Storchaka in branch 'default': Issue bpo-23775: pprint() of OrderedDict now outputs the same representation https://hg.python.org/cpython/rev/afc21da5935f
Thank you for your review Berker.
serhiy-storchaka
No branches or pull requests
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: