You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be a way to silently retrieve a non-existent object key, especially since remodel's interface wants to be dict-like (which has get(key[, default])).
In the end, we'll be able to do the following:
user=User(name='Andrei')
printuser.get('name') # prints 'Andrei'printuser.get('address') # prints Noneprintuser.get('address', 'Example Street') # prints 'Example Street'
The text was updated successfully, but these errors were encountered:
It should be a way to silently retrieve a non-existent object key, especially since remodel's interface wants to be
dict
-like (which hasget(key[, default])
).In the end, we'll be able to do the following:
The text was updated successfully, but these errors were encountered: