]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-145887: Use `write()` instead of `stream.write()` in `PrettyPrinter._pprint_frozen...
authordevdanzin <74280297+devdanzin@users.noreply.github.com>
Fri, 13 Mar 2026 11:57:35 +0000 (08:57 -0300)
committerGitHub <noreply@github.com>
Fri, 13 Mar 2026 11:57:35 +0000 (12:57 +0100)
Lib/pprint.py

index e111bd59d4152c6c4a977ecd248fc283ca911a54..a0e484b1c097c3aa5b4cb72e9e39e87ef0110afd 100644 (file)
@@ -238,7 +238,7 @@ class PrettyPrinter:
     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,