回答編集履歴

1

追記

2020/12/17 11:59

投稿

sfdust
sfdust

スコア1137

test CHANGED
@@ -105,3 +105,7 @@
105
105
 
106
106
 
107
107
  参考:https://stackoverflow.com/questions/25040834/prevent-other-classes-methods-from-calling-my-constructor
108
+
109
+
110
+
111
+ 注)この方法によっても`Foo.__new__(Foo)`という呼び出し方はできてしまう。