4 ms·
This will add some overhead for every single call to such wrapped function. If you use that extensively for many classes, won't that be a huge performance degra
by albertzeyer 11y ago
This will add some overhead for every single call to such wrapped function. If you use that extensively for many classes, won't that be a huge performance degradation?
It would maybe be nice to have a flag so that these wrappings apply only in test or debug mode.
Also, it works e.g. by using `inspect.currentframe().f_back.f_back`. I'm not sure if that is such a clean and stable solution. (See e.g. here: https://github.com/amitassaraf/lang/blob/master/src/lang/access.py https://github.com/amitassaraf/lang/blob/master/src/lang/acc...) E.g. when you add other wrappers around your function, I'm quite sure that this would break.