[問題] ._name_無法使用
想請問各位高手一下
最近剛開始學python
照著書上的範例照打結果竟然錯誤...
>>> def amazing():
print('this function is named :', amazing._name_)
執行結果應該是:
>>>amazing()
>>>this function is named : amazing
但我執行的時候程式會一直顯示._name_這地方是錯誤的!?
想請教到底是出了什麼問題....??
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 49.158.111.9
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1469767566.A.9E3.html
推
07/29 12:56, , 1F
07/29 12:56, 1F
→
07/29 13:11, , 2F
07/29 13:11, 2F