I need to copy fields from one dictionary to another. I'm seeing strange behavior where dictionary['key'] = ...
sometimes gives me a Tuple
rather than a String
which I can't figure out.
Originally, I have a dictionary called agreement
which has a String alternate_address
field:
Then
formValues = {}
# ...
formValues['street'] = agreement.get('alternate_address', None),
gives me the following. Note that a similar field, city
, also containing spaces, has no issues and remains a String, and I fetch it in exactly the same way.