作者tsaiminghan (nahgnimiast)
看板Python
標題[問題] class中method名稱一樣
時間Sun Aug 30 22:30:49 2020
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://webptt.com/m.aspx?n=bbs/Python/M.1598797854.A.E01.html
1F:→ mikapauli: 懶得取名字 08/30 22:35
2F:→ tsaiminghan: 都_,呼叫怎麼區別? 08/30 22:38
3F:→ CMJ0121: 暗示你不要直接呼叫他 透過 decorator 使用就好 08/30 22:42
我對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