This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: inspect.signature fails on math.hypot
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eric.fahlgren, mark.dickinson, rhettinger
Priority: normal Keywords:

Created on 2020-02-13 18:16 by eric.fahlgren, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg361966 - (view) Author: Eric Fahlgren (eric.fahlgren) * Date: 2020-02-13 18:16
Python 3.8's new math.hypot function also appears to suffer from the same issue as math.log:

>>> import math, inspect
>>> inspect.signature(math.hypot)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python38\lib\inspect.py", line 3093, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
  File "C:\Program Files\Python38\lib\inspect.py", line 2842, in from_callable
    return _signature_from_callable(obj, sigcls=cls,
  File "C:\Program Files\Python38\lib\inspect.py", line 2296, in _signature_from_callable
    return _signature_from_builtin(sigcls, obj,
  File "C:\Program Files\Python38\lib\inspect.py", line 2107, in _signature_from_builtin
    raise ValueError("no signature found for builtin {!r}".format(func))
ValueError: no signature found for builtin <built-in function hypot>

Possibly related to issue29299?
msg361986 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-02-14 05:39
This isn't a bug.  It is a known limitation of the ArgumentClinic that it cannot currently describe functions with *args.   That and other limitations is also why we don't have signatures for min() max() range() etc.
History
Date User Action Args
2022-04-11 14:59:26adminsetgithub: 83810
2020-02-14 05:39:39rhettingersetstatus: open -> closed

nosy: + rhettinger
messages: + msg361986

resolution: not a bug
stage: resolved
2020-02-13 19:56:50mark.dickinsonsetnosy: + mark.dickinson
2020-02-13 18:16:37eric.fahlgrencreate