回答編集履歴
1
修正
test
CHANGED
@@ -38,22 +38,38 @@
|
|
38
38
|
|
39
39
|
my_instance.method(self)
|
40
40
|
|
41
|
+
print('-' * 42)
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
MyClass.method(my_instance, self)
|
46
|
+
|
47
|
+
print('-' * 42)
|
48
|
+
|
41
49
|
```
|
42
50
|
|
43
51
|
|
44
52
|
|
45
|
-
**実行結果** [Wandbox](https://wandbox.org/permlink/
|
53
|
+
**実行結果** [Wandbox](https://wandbox.org/permlink/1E0Qm1z7yyhk3l7p)
|
46
54
|
|
47
55
|
```
|
48
56
|
|
49
|
-
my_instance=<__main__.MyClass object at 0x7f
|
57
|
+
my_instance=<__main__.MyClass object at 0x7f7f54d5fb50>
|
50
58
|
|
51
59
|
self=42
|
52
60
|
|
53
61
|
------------------------------------------
|
54
62
|
|
55
|
-
self=<__main__.MyClass object at 0x7f
|
63
|
+
self=<__main__.MyClass object at 0x7f7f54d5fb50>
|
56
64
|
|
57
65
|
val=42
|
58
66
|
|
67
|
+
------------------------------------------
|
68
|
+
|
69
|
+
self=<__main__.MyClass object at 0x7f7f54d5fb50>
|
70
|
+
|
71
|
+
val=42
|
72
|
+
|
73
|
+
------------------------------------------
|
74
|
+
|
59
75
|
```
|