Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8aea0cc

Browse files
committed
Now that int is subclassable, have to change a test that tests for
non-subclassability. (More tests for number subclassing should follow.)
1 parent bef1417 commit 8aea0cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_descr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,12 +684,12 @@ class C(object, Classic):
684684
verify(0, "inheritance from object and Classic should be illegal")
685685

686686
try:
687-
class C(int):
687+
class C(type(len)):
688688
pass
689689
except TypeError:
690690
pass
691691
else:
692-
verify(0, "inheritance from int should be illegal")
692+
verify(0, "inheritance from CFunction should be illegal")
693693

694694
try:
695695
class C(object):

0 commit comments

Comments
 (0)