[issue37497] Add inspect.Signature.from_text().

2020-03-06 Thread Yury Selivanov
Yury Selivanov added the comment: I'd be fine with `Signature.from_text()`, but not with `Signature` constructor / `signature()` function accepting both callable and string arguments. Overall, I think that we ought to have a real need to add this new API, so unless there's a good (or any, re

[issue37497] Add inspect.Signature.from_text().

2020-03-06 Thread Eric Snow
Eric Snow added the comment: Honestly, I don't recall exactly the concrete use case for which I opened this. :) I *think* it was related to applying a more restrictive signature onto an existing function (e.g. with a decorator). -- ___ Python tra

[issue37497] Add inspect.Signature.from_text().

2020-02-26 Thread Yury Selivanov
Yury Selivanov added the comment: What's the actual use case for exposing this functionality? -- ___ Python tracker ___ ___ Python-

[issue37497] Add inspect.Signature.from_text().

2019-07-03 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue37497] Add inspect.Signature.from_text().

2019-07-03 Thread Eric Snow
Eric Snow added the comment: Note that there has been a little discussion of this in the past, particularly around the time that argument clinic was introduced: https://bugs.python.org/issue23967#msg241140. -- ___ Python tracker

[issue37497] Add inspect.Signature.from_text().

2019-07-03 Thread Eric Snow
New submission from Eric Snow : In early 2014 (3.3), when argument clinic was added, we added support for turning func.__text_signature__ into an inspect.Signature object. However, the functionality to convert a string into a Signature was never exposed publicly. Here's a patch to do so. N