A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/093526.html below:

Interesting Syntax: 'Bunch' class

Interesting Syntax: 'Bunch' class Interesting Syntax: 'Bunch' classFredrik Lundh fredrik at pythonware.com
Mon Apr 9 03:06:51 EDT 2001
Andy Todd wrote:

> However, I'm puzzled by a bit of  syntax that I haven't seen before
> and can't find (easily) in the manual, viz;
>
> "    def __init__(self, **kwds):"
>
> What is the "**kwds" a reference to? All help greatfully received ...

where did you look?  the obvious place should be under
"function definitions" in the language reference:

    http://www.python.org/doc/current/ref/function.html

    ...

    "If the form *identifier is present, it is initialized to a
    tuple receiving any excess positional parameters, defaulting
    to the empty tuple. If the form **identifier is present, it is
    initialized to a new dictionary receiving any excess keyword
    arguments, defaulting to a new empty dictionary."

    ...

Cheers /F



More information about the Python-list 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