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/2005-September/340536.html below:

What is the role of F in dict(E, **F)

What is the role of F in dict(E, **F)Alex lidenalex at yahoo.se
Mon Sep 5 04:16:58 EDT 2005
Entering

>>> help(dict.update)
Help on method_descriptor:

update(...)
    D.update(E, **F) -> None.  Update D from E and F: for k in E: D[k]
= E[k]
    (if E has keys else: for (k, v) in E: D[k] = v) then: for k in F:
D[k] = F[k]

>>>

As I understand update() is used to merge two dictionaries, for example

>>> D={'a':1, 'b':2}
>>> E={'b':4,'c':6}
>>> D.update(E)
>>> D
{'a': 1, 'c': 6, 'b': 4}
>>>

But what is the role of **F?

Alex


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