A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-March/124756.html below:

New DSL syntax and slightly changed semantics for the Argument Clinic DSL.

[Python-Dev] [Python-checkins] peps: New DSL syntax and slightly changed semantics for the Argument Clinic DSL.Ronald Oussoren ronaldoussoren at mac.com
Mon Mar 18 23:50:21 CET 2013
On 18 Mar, 2013, at 23:43, Larry Hastings <larry at hastings.org> wrote:

> On 03/18/2013 02:29 AM, Ronald Oussoren wrote:
>> On 18 Mar, 2013, at 8:16, Larry Hastings <larry at hastings.org> wrote:
>>> This has some consequences.  For example, inspect.getfullargspec, inspect.Signature, and indeed types.FunctionObject and types.CodeObject have no currently defined mechanism for communicating that a parameter is positional-only.
>> inspect.Signature does have support for positional-only arguments, they have inspect.Parameter.POSITIONAL_ONLY as their kind.
> 
> You're right!  And I should have remembered that--I was one of the authors of the inspect.Signature PEP.  It's funny, it can represent something that it has no way of inferring ;-)

It doesn't necessarily have to, builtin functions could grow a __signature__ attribute that calculates the signature (possibly from the DSL data). I've done something like that in a pre-release version of PyObjC, and with some patching of pydoc and inspect (see #17053) I now have useful help information for what are basicly builtin functions with positional-only arguments.

Ronald

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130318/16afbe8a/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4