Which way to refer to a Parent Object
Discussions on Python.org
Which way to refer to a Parent Object
As a bit of a noobie to Python forgive me if I am missing something obvious but… I need to refer to a parent object and I believe there are two ways; either use sys._getframe(2) or by it’s name '<parentName>.<methodName'. Is there any difference between these two and which is preferable? I have wondered if the sys._getframe(2) would be better for if this code gets run multithreaded, in that case might the '<parentName>.<methodName' way not work correctly. The use case is where I am running ...
0 comments
No comments yet.