diff options
author | Guido van Rossum <guido@python.org> | 2001-09-25 03:56:29 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-25 03:56:29 (GMT) |
commit | a4cb78874ce31bef1a4c05bd5bace387bc5bb677 (patch) | |
tree | 693cfdc4e8d4fc477c10a6a9dd59cbe216b99e62 /Lib/test/test_repr.py | |
parent | 5c294fb0e634afc4807ca83032ace356512c97dc (diff) | |
download | cpython-a4cb78874ce31bef1a4c05bd5bace387bc5bb677.zip cpython-a4cb78874ce31bef1a4c05bd5bace387bc5bb677.tar.gz cpython-a4cb78874ce31bef1a4c05bd5bace387bc5bb677.tar.bz2 |
Change repr() of a new-style class to say <class 'ClassName'> rather
than <type 'ClassName'>. Exception: if it's a built-in type or an
extension type, continue to call it <type 'ClassName>. Call me a
wimp, but I don't want to break more user code than necessary.
Diffstat (limited to 'Lib/test/test_repr.py')
-rw-r--r-- | Lib/test/test_repr.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_repr.py b/Lib/test/test_repr.py index b7d9374..1c63e4d 100644 --- a/Lib/test/test_repr.py +++ b/Lib/test/test_repr.py @@ -208,7 +208,7 @@ class foo(object): ''') from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import foo eq(repr(foo.foo), - "<type 'areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation.foo.foo'>") + "<class 'areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation.foo.foo'>") def test_object(self): # XXX Test the repr of a type with a really long tp_name but with no |