Stefan Behnel <stefan...@behnel.de> added the comment:

For the same reason that motivated this ticket, I think the functions should be 
inline functions. They should also take the current thread-state as argument, 
because that's probably known on the caller side already.

I guess a macro would be fine, too. :)

Cython previously used "use_tracing" directly because it needs to implement the 
exact same tracing/profiling behaviour as CPython, regardless of who called a 
Cython implemented function (Cython or CPython).

Naming nit: Get/Is/UsesTracing?

Also, given that a common use case seems to be "make sure tracing is disabled, 
do something, enable tracing if it was enabled", I think DisableTracing() 
should return the previous state.

----------
nosy: +scoder

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to