mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)
I suppose it is a remnants of very old code written when str, int, list, dict, etc were functions and not classes.
This commit is contained in:
parent
c826867b7c
commit
3680ebed7f
19 changed files with 41 additions and 39 deletions
|
@ -203,7 +203,7 @@ class QueryTestCase(unittest.TestCase):
|
|||
def test_unreadable(self):
|
||||
# Not recursive but not readable anyway
|
||||
pp = pprint.PrettyPrinter()
|
||||
for unreadable in type(3), pprint, pprint.isrecursive:
|
||||
for unreadable in object(), int, pprint, pprint.isrecursive:
|
||||
# module-level convenience functions
|
||||
self.assertFalse(pprint.isrecursive(unreadable),
|
||||
"expected not isrecursive for %r" % (unreadable,))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue