Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement
Description
>>>importmath>>>importinspect>>>inspect.signature(math.hypot) Traceback (mostrecentcalllast): File"<stdin>", line1, in<module>File"/home/sk/src/cpython/Lib/inspect.py", line3295, insignaturereturnSignature.from_callable(obj, follow_wrapped=follow_wrapped, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/sk/src/cpython/Lib/inspect.py", line3039, infrom_callablereturn_signature_from_callable(obj, sigcls=cls, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/sk/src/cpython/Lib/inspect.py", line2531, in_signature_from_callablereturn_signature_from_builtin(sigcls, obj, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/sk/src/cpython/Lib/inspect.py", line2330, in_signature_from_builtinraiseValueError("no signature found for builtin{!r}".format(func)) ValueError: nosignaturefoundforbuiltin<built-infunctionhypot>This patch works:
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 1342162fa7..0e610eb9cb 100644 --- a/Modules/mathmodule.c+++ b/Modules/mathmodule.c@@ -2805,7 +2805,9 @@ math_hypot(PyObject *self, PyObject *const *args, Py_ssize_t nargs) #undef NUM_STACK_ELEMS PyDoc_STRVAR(math_hypot_doc, - "hypot(*coordinates) -> value\n\n\+ "hypot($module, *coordinates)\n\+--\n\+\n\ Multidimensional Euclidean distance from the origin to a point.\n\ \n\ Roughly equivalent to:\n\Linked PRs
erlend-aasland
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement