回答編集履歴
1
追記
answer
CHANGED
@@ -51,4 +51,6 @@
|
|
51
51
|
>> NotImplementedError
|
52
52
|
```
|
53
53
|
|
54
|
-
参考:https://stackoverflow.com/questions/25040834/prevent-other-classes-methods-from-calling-my-constructor
|
54
|
+
参考:https://stackoverflow.com/questions/25040834/prevent-other-classes-methods-from-calling-my-constructor
|
55
|
+
|
56
|
+
注)この方法によっても`Foo.__new__(Foo)`という呼び出し方はできてしまう。
|