Add snippet to check that int.__init__ doesn't mutate int.

This commit is contained in:
Adam Kelly committed 2018-09-02 10:59:42 +01:00
1 parent 76344e5023
commit ec0eb47fc6
1 file changed
+10
+10
View File
@@ -0,0 +1,10 @@
x = 5
x.__init__(6)
assert x == 5
class A(int):
pass
x = A(7)
assert x == 7
assert type(x) is A