【发布时间】:2018-02-04 07:32:20
【问题描述】:
我正在尝试实现这样的类:
class A:
# some functions..
def foo(self, ...)
# if self has been instantiated for less than 1 minute then return
# otherwise continue with foo's code
我想知道,有没有办法实现像foo() 这样的功能?
【问题讨论】:
-
无法理解
if self has been instantiated for less than 1 minute的意思
标签: python python-3.x class time