On Wed, Apr 21, 2021 at 7:46 AM Rob Cliffe via Python-ideas
<python-ideas@python.org> wrote:
> On 20/04/2021 19:23, Pol Welter wrote:
> > Would it be reasonable to include the line number for the function `foo()` 
> > that it resolved the call to? I.e. 'File "<stdin>", line 1, in foo'.
> And presumably the module name as well.  If foo had been imported from a
> different module instead of defined in the current one, the line number
> alone would be less helpful.

Maybe the easiest/best way would be to have a reference to the
function itself available on the exception object?

ChrisA
_______________________________________________
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/XU72HFNXA2GAGBDHEU2SQMGEGSGWA7S4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to