[issue17159] Remove explicit type check from inspect.Signature.from_function()

Nick Coghlan report at bugs.python.org
Mon Feb 11 10:46:44 CET 2013


Nick Coghlan added the comment:

On Mon, Feb 11, 2013 at 11:46 AM, Terry J. Reedy <report at bugs.python.org> wrote:
> I am also puzzled by the 'from None' part in
> + raise TypeError("'{!r}' is not a Python function".format(func)) from None
>
> While I remember that being in the pydev discussion and while "raise XyzError from None" executes, it does not seems to be documented for 3.3 in 7.8. The raise statement. (Should this be another issue?) In fact, that section says " if given, the second expression must be another exception class or instance", which excludes None.

That's a separate docs bug - it seems we missed the necessary language
reference updates when implementing PEP 309. The relevant docs are
here: http://docs.python.org/3/library/exceptions.html#built-in-exceptions

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17159>
_______________________________________


More information about the Python-bugs-list mailing list