判断类或对象方法

widget = widget or self.widget
if isinstance(widget, type):
    widget = widget()
else:
    widget = copy.deepcopy(widget)

  

posted @ 2020-06-17 09:30  Fmaj-7  阅读(120)  评论(0编辑  收藏  举报