我有课
class A: def __init__(self): print(i was used by :) # if i call this class from the function below, def my_func(): a = A() # I need class A to print that "i was used in: my_func() "
有什么解决办法吗?
python python-2.7
python ×1
python-2.7 ×1