Julien Palard added the comment:
Hi Serhiy,
hi: Py_ssize_t(py_default="len(a)") = -1
Won't works, as pydoc will use the inspect module (_signature_fromstr) to get
the signature. _signature_fromstr expects a valid python signature, but `def
foo(a, x, lo=0, high=len(a)): pass` is not valid (SyntaxError).
Should we note that in the clinic documentation:
> py_default
> default as it should appear in Python code, as a string. Or None if there
> is no default.
> py_default
> default as it should appear in valid Python code, as a string. Or None if
> there is no default.
?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28754>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com