Skip to content

The doc of dict.update() should show update(**other) instead of update([other]) #137593

@hyperkai

Description

@hyperkai

The doc of dict.update() shows below:

update([other])

Then, according to my experiments below, dict.update() accepts zero or more pairs of a key and value:

v = {'name':'John', 'age':36}

v.update()
v.update(name='David', gender='Male')
v.update({'name':'David', 'gender':'Male'})

print(v)
# {'name': 'David', 'age': 36, 'gender': 'Male'}

So, the doc of dict.update() should show below:

update(**other)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions