On Fri, Apr 17, 2020 at 08:12:26PM -0300, Joao S. O. Bueno wrote:

> For what matters, when I stopped to think about this, I came out with this
> exactly design!
> 
> Maybe this is a 'one obvious way' to deal with it, without changing any
> syntax?

There's nothing "obvious" about using a private implementation detail of 
CPython that probably won't work in other Pythons.


> > ...     caller = sys._getframe(1)

Outsider: "Python needs proper private variables."

The Python community: "We don't need that, everyone knows not to use 
names starting with a single leading underscore because they're 
private."

Also the Python community: "Let's use `_getframe`!"

*wink*



-- 
Steven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/VVZJDHPNLIC2ZTGQAUHUDXGPRXSIKUD3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to