0
私はフォロープログラムを書いたが、うまくいかなかった。何が問題なの?Pythonのメタクラスのタイプエラー
def h(self):
print "Hello World"
if __name__ == '__main__':
hello = type('HelloThread', bases=(threading.Thread,object), dict=dict(hello=h))
エラーそれが実行することです:
TypeError: type.__init__() takes no keyword arguments
私のPythonのバージョンpython2.7
達成しようとしていることは何ですか?予想される出力は何ですか? – AKS