Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b8db41

Browse files
committed
Update pprint() to match the new repr style for frozensets
1 parent db96789 commit 4b8db41

2 files changed

Lines changed: 160 additions & 161 deletions

File tree

Lib/pprint.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,12 @@ def _format(self, object, stream, indent, allowance, context, level):
175175
write('{')
176176
endchar = '}'
177177
object = sorted(object)
178-
indent += 4
179178
elif issubclass(typ, frozenset):
180179
if not length:
181180
write('frozenset()')
182181
return
183-
write('frozenset([')
184-
endchar = '])'
182+
write('frozenset({')
183+
endchar = '})'
185184
object = sorted(object)
186185
indent += 10
187186
else:

0 commit comments

Comments
 (0)