mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Change the repr() of frozenset instances (and set subclasses)
from name([e1, e2, ...]) to name({e1, e2, ...}). This makes more sense now we have the set notation.
This commit is contained in:
parent
0cb85a972f
commit
bdba5cf694
2 changed files with 25 additions and 23 deletions
|
@ -265,7 +265,7 @@ class TestJointOps(unittest.TestCase):
|
|||
self.assertEqual(repr(s), '{set(...)}')
|
||||
else:
|
||||
name = repr(s).partition('(')[0] # strip class name
|
||||
self.assertEqual(repr(s), '%s([%s(...)])' % (name, name))
|
||||
self.assertEqual(repr(s), '%s({%s(...)})' % (name, name))
|
||||
|
||||
def test_cyclical_print(self):
|
||||
w = ReprWrapper()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue