Answer the question
In order to leave comments, you need to log in
How to determine the position of a method in a call chain?
Greetings!
- - -
I need an object for call tracing.
class MyTracerClass:
def __init__(self):
self._trace = []
def __getattr__(self, item):
# как вот здесь определить, что дальше ничего не вызывается?
self._trace.append(item)
return self
tracer = MyTracerClass()
tracer.aaa.bbb.xxx
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question