Is there a method like putAll() for dict in python? I did not find a method in the document that seems to do this. Sure I can iterate over the key set and put every thing in the new dict, but I think there might be a better way.
Also (this might be another question), is ‘Python Library Reference’ considered the API document for python? I’m more used to javadoc like API document that has a list of classes and methods. With ‘Python Library Reference’, I always wonder if all methods of a class are listed and there’s no link that I can jump around to see the definition of parameters and return type.
If you are talking about Java’s
putAllfor maps,dict.updatewould be the equivalent in Python:Regarding the documentation, there is an overview which links all the specific module documentation. In your specific instance, you’d then click on Mapping Types — dict and browser through the available operations.