Mohamad Kanj <mhmd.k...@gmail.com> added the comment:

Thanks Raymond for the input.
So with some experimentation, the __enter__() & __exit__() functions could be 
traceable when other kinds of objects are used with the context manager (i.e 
with statement using file IO or custom class objects). However, just when the 
object is a Lock object, then this is not the case anymore - which basically 
shows an unusual behavior if we were to think that such statements are executed 
for a specific thread. Also please mind that the threading module already 
implements settrace() and setprofile() methods like the sys module to extend 
tracing capabilities.

----------

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

Reply via email to