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-October/129288.html below:

[Python-Dev] PEP 457: Syntax For Positional-Only Parameters

[Python-Dev] PEP 457: Syntax For Positional-Only Parameters [Python-Dev] PEP 457: Syntax For Positional-Only ParametersLarry Hastings larry at hastings.org
Wed Oct 9 09:44:53 CEST 2013
On 10/09/2013 03:57 AM, Joao S. O. Bueno wrote:
> def a([b],/,**kw):
>     print (b)
>
> does calling "a(b=5)" should raise a TypeError, or put "5" in
> """kw["b"]""" and leave
> "b" as "undefined" ?

The latter.  This is how they are "similarly to *args and **kwargs":

     >>> def foo(*a, **kw):
    ...   print(a, kw)
    ...
     >>> foo(a=3, kw=5)
    () {'kw': 5, 'a': 3}
     >>>

//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20131009/4d9b0b96/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