1. 程式人生 > >Python: TypeError: 'dict' object is not callable

Python: TypeError: 'dict' object is not callable

問題:  TypeError: 'dict' object is not callable

原因:  dict()是python的一個內建函式,如果將dict自定義為一個python字典,在之後想呼叫dict()函式是會報出“TypeError: 'dict' object is not callable”的錯誤,

解決辦法:  >>>del (dict)