Skip to content

Commit b5acb15

Browse files
committed
Test sub classes of int work correctly.
1 parent 4d24cd1 commit b5acb15

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/snippets/int_subclass.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import dis
2+
3+
class A(int):
4+
def __init__(self):
5+
self.x = "attr"
6+
7+
a = A()
8+
9+
assert 2 * a == 0
10+
assert a.x == "attr"

0 commit comments

Comments
 (0)