Re: Python **kwargs ?
johnny a écrit :
What is **kwargs mean in python? When you put double **, does it mean
passing by reference?
Nope.
Python as support for both positional (*args) and named (**kwargs) varargs.
For example:
def redirect_to(request, url, **kwargs):
means that redirect_to expect a positional 'request' arg, a positional
'url' argument, and any other arbitrary named arguments.
You'll find all relevant doc in the FineManual(tm):
http://www.python.org/doc/current/tut/node6.html#SECTION006720000000000000000
HTH
.
Relevant Pages
- Re: Why does python break IEEE 754 for 1.0/0.0 and 0.0/0.0?
... >> Note that support for 754 was rare on Python platforms at the ... > production and handling of infinities and NaNs) for more than ... (comp.lang.python) - web2py 1.56 is OUT
... Includes a pure Python based template language with no indentation requirements. ... The same apps can run on a PC with Oracle or on the Google App Engine or on Windows Mobile, without changes, including DB API. ... Douglas Andrade (2.6 compliance, docstrings) ... Jose Jachuf (Firebird support) ... (comp.lang.python.announce) - ANN: Twisted 9.0.0
... This release supports Python 2.3 through Python 2.6, ... last one that will support Python 2.3. ... The memcache protocol implementation got some nice new features. ... The IMAP server and client protocol implementations had many fixes. ... (comp.lang.python) - ANN: Twisted 9.0.0
... This release supports Python 2.3 through Python 2.6, ... last one that will support Python 2.3. ... The memcache protocol implementation got some nice new features. ... The IMAP server and client protocol implementations had many fixes. ... (comp.lang.python.announce) - cx_Freeze 4.0
... cx_Freeze is a set of scripts and modules for freezing Python scripts ... into executables in much the same way that py2exe and py2app do. ... Added support for a hook that runs when a module is missing. ... Added sample script for freezing an application using matplotlib. ... (comp.lang.python.announce) |
|