STINNER Victor added the comment:

> If add an assertion, the user code could provoke a crash by creating an 
> exception type with a name containing "()": type('E()', (BaseException,), {}).

Right. Do we have such code currently? If not, we can remove the assertion 
later if we want to use such error message.

> Thus this should be a runtime check that raises an exception. What the type 
> of an exception should be raised?

Sorry, I don't understand. funcname is not always a constant string like "func"?

Well, it was just an idea. Ignore it if you see practical issues.

----------

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

Reply via email to