@@ -49,16 +49,18 @@ def __new__(cls, old: float, new: float) -> float:
49
49
cls .memmove (id (old ) + cls .offset , new_data , len (new_data ))
50
50
return old
51
51
52
- my_tuple = (1 , 2 , 3 )
53
- print (my_tuple , id (my_tuple ))
54
- modify_tuple (my_tuple , 1 , "hello" )
55
- print (my_tuple , id (my_tuple ), (1 , 2 , 3 ), (* range (1 ,4 ),))
56
-
57
- my_string = "very cool python code"
58
- print (my_string , id (my_tuple ))
59
- modify_string (my_string , 10 , "ctype stuff" )
60
- print (my_string , id (my_tuple ), "very cool python code" , "a " + "very cool python code" )
61
-
62
- my_float = 1.1
63
- modify_float (my_float , 0.1 )
64
- print (my_float , 1.1 , my_float + 0.5 , 1.1 + 0.5 )
52
+ if __name__ == "__main__" :
53
+
54
+ my_tuple = (1 , 2 , 3 )
55
+ print (my_tuple , id (my_tuple ))
56
+ modify_tuple (my_tuple , 1 , "hello" )
57
+ print (my_tuple , id (my_tuple ), (1 , 2 , 3 ), (* range (1 ,4 ),))
58
+
59
+ my_string = "very cool python code"
60
+ print (my_string , id (my_tuple ))
61
+ modify_string (my_string , 10 , "ctype stuff" )
62
+ print (my_string , id (my_tuple ), "very cool python code" , "a " + "very cool python code" )
63
+
64
+ my_float = 1.1
65
+ modify_float (my_float , 0.1 )
66
+ print (my_float , 1.1 , my_float + 0.5 , 1.1 + 0.5 )
0 commit comments