https://github.com/python/cpython/commit/0b6a2346e5b203fb988a382fdc3d51b36641fe1a
commit: 0b6a2346e5b203fb988a382fdc3d51b36641fe1a
branch: main
author: devdanzin <[email protected]>
committer: vstinner <[email protected]>
date: 2026-03-13T12:57:35+01:00
summary:
gh-145887: Use `write()` instead of `stream.write()` in
`PrettyPrinter._pprint_frozendict` (#145894)
files:
M Lib/pprint.py
diff --git a/Lib/pprint.py b/Lib/pprint.py
index e111bd59d4152c..a0e484b1c097c3 100644
--- a/Lib/pprint.py
+++ b/Lib/pprint.py
@@ -238,7 +238,7 @@ def _pprint_dict(self, object, stream, indent, allowance,
context, level):
def _pprint_frozendict(self, object, stream, indent, allowance, context,
level):
write = stream.write
cls = object.__class__
- stream.write(cls.__name__ + '(')
+ write(cls.__name__ + '(')
length = len(object)
if length:
self._pprint_dict(object, stream,
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]