Update pprint() to match the new repr style for frozensets

This commit is contained in:
Raymond Hettinger
2008-01-31 01:10:03 +00:00
parent db96789ba7
commit 4b8db419c2
2 changed files with 160 additions and 161 deletions

View File

@@ -175,13 +175,12 @@ class PrettyPrinter:
write('{')
endchar = '}'
object = sorted(object)
indent += 4
elif issubclass(typ, frozenset):
if not length:
write('frozenset()')
return
write('frozenset([')
endchar = '])'
write('frozenset({')
endchar = '})'
object = sorted(object)
indent += 10
else: