-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
In the recent PR that added frozendict support to pprint (#144908), I let a small inconsistency get through: we set write = stream.write then immediately uses stream.write two lines below:
Lines 238 to 248 in cd52172
| def _pprint_frozendict(self, object, stream, indent, allowance, context, level): | |
| write = stream.write | |
| cls = object.__class__ | |
| stream.write(cls.__name__ + '(') | |
| length = len(object) | |
| if length: | |
| self._pprint_dict(object, stream, | |
| indent + len(cls.__name__) + 1, | |
| allowance + 1, | |
| context, level) | |
| write(')') |
cc @vstinner. May I write the trivial PR?
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error