Stefan Behnel added the comment: I tried the third patch and it works, but when I write this into a docstring:
def func(x, *, y=None): """sig=(a,b)""" then it fails to extract the signature again and returns (a,b) instead. I also tried putting in some math term as (non-signature) documentation: def sig(a, b): """sig=(a*b)""" and it raises a ValueError telling me that the signature is invalid. So, I still think it should prefer a full function interface over the risky "__text_signature__" quirk whenever it can. I also think it shouldn't raise an error if the docstring isn't something that it can parse, but that's not part of this ticket, I guess. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17159> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com