Quick_set()
Easily update a dictionary with the values from another.
The quick_set()
function updates a dictionary with the values from another dictionary with the same keys.
Usage
quick_set(..., ...)
Parameters
A dictionary
Example
user = {
name: 'Name',
email: '[email protected]
}
# Let's say that the request body looks like this:
request_body = {
name: 'New name',
email: '[email protected]'
}
# Update user
user = quick_set(user, request_body)
Last updated