[問題] class中method名稱一樣

看板Python作者 (nahgnimiast)時間4年前 (2020/08/30 22:30), 4年前編輯推噓0(003)
留言3則, 3人參與, 4年前最新討論串1/1
https://github.com/eight04/ComicCrawler/blob/master/comiccrawler/gui/main_window.py 縮網址 https://tinyurl.com/yxpplpmq 554行,這個class用了很多_的同名函式,請問這是什麼用法? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.136.106.16 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1598797854.A.E01.html

08/30 22:35, 4年前 , 1F
懶得取名字
08/30 22:35, 1F

08/30 22:38, 4年前 , 2F
都_,呼叫怎麼區別?
08/30 22:38, 2F

08/30 22:42, 4年前 , 3F
暗示你不要直接呼叫他 透過 decorator 使用就好
08/30 22:42, 3F
我對decorator的印象是網路上看來的 @XXXX def YYYY 呼叫YYY時,會呼叫XXXX中回傳的函式, 寫code時,還是呼叫YYYY 請問透過decorator使用大約是怎麼呼叫的? ------------------------------------------------- 原來worker也是eight04寫的module https://github.com/eight04/pyWorker ,查一下這個就差不了,學到一種新的用法 ※ 編輯: tsaiminghan (122.146.57.196 臺灣), 08/31/2020 11:30:05
文章代碼(AID): #1VIxWUu1 (Python)
文章代碼(AID): #1VIxWUu1 (Python)