summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descrtut.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-25 03:56:29 (GMT)
committerGuido van Rossum <guido@python.org>2001-09-25 03:56:29 (GMT)
commita4cb78874ce31bef1a4c05bd5bace387bc5bb677 (patch)
tree693cfdc4e8d4fc477c10a6a9dd59cbe216b99e62 /Lib/test/test_descrtut.py
parent5c294fb0e634afc4807ca83032ace356512c97dc (diff)
downloadcpython-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_descrtut.py')
-rw-r--r--Lib/test/test_descrtut.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_descrtut.py b/Lib/test/test_descrtut.py
index e72567d..a0de4cc 100644
--- a/Lib/test/test_descrtut.py
+++ b/Lib/test/test_descrtut.py
@@ -37,16 +37,16 @@ test_1 = """
Here's the new type at work:
>>> print defaultdict # show our type
- <type 'test.test_descrtut.defaultdict'>
+ <class 'test.test_descrtut.defaultdict'>
>>> print type(defaultdict) # its metatype
<type 'type'>
>>> a = defaultdict(default=0.0) # create an instance
>>> print a # show the instance
{}
>>> print type(a) # show its type
- <type 'test.test_descrtut.defaultdict'>
+ <class 'test.test_descrtut.defaultdict'>
>>> print a.__class__ # show its class
- <type 'test.test_descrtut.defaultdict'>
+ <class 'test.test_descrtut.defaultdict'>
>>> print type(a) is a.__class__ # its type is its class
1
>>> a[1] = 3.25 # modify the instance