Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

You cannot expect that running code under debugger does not have any effect. 
Otherwise there would not be any meaning in debugger. Running code under 
debugger has some side effects, and setting locals __return__ and __exception__ 
is one of them. If it exposes bugs in user code -- well, it is a purpose of 
debugger.

I think that there are two options for this issue.

1. Add a type check for locals in the frame constructor (and maybe at higher 
levels).

2. Close it as "not a bug". Using functions outside of documented scope has 
undefined behavior. Python usually does not check types of arguments. If it 
works -- it works, if not -- blame on you.

----------

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

Reply via email to