Dictionary update method in Python 3.4 -


the update(...) method dictionary (see doc) has optional argument other.

i understand when argument dictionary. if don't put argument, nothing.

>>> = {'1':'first', '2':'second'} >>> {'2': 'second', '1': 'first'} >>> a.update() >>> {'2': 'second', '1': 'first'}   

what don't understand why optional argument, , not compulsory one.

there no point in doing a.update() no arguments, or wrong somewhere? thought maybe trick passing iterable of key/value pairs instead of dictionary argument.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -