這是本文件的舊版!
Import Class - 'module' object is not callable
Problem
這算是初學者問題。範例專案結構如下:
example/
__init_.py
Test.py
main.py
Test.py中有一個class叫Test,而main.py我這樣使用它:
from example import Test test = Test()在執行時,會出現TypeError: 'module' object is not callable。