作者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/cn.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