

def _get_for_dict(self, entity):
    'Retrieve the value like _get_value(), processed for _to_dict().\n\n    Property subclasses can override this if they want the dictionary\n    returned by entity._to_dict() to contain a different value.  The\n    main use case is StructuredProperty and LocalStructuredProperty.\n\n    NOTES:\n\n    - If you override _get_for_dict() to return a different type, you\n      must override _validate() to accept values of that type and\n      convert them back to the original type.\n\n    - If you override _get_for_dict(), you must handle repeated values\n      and None correctly.  (See _StructuredGetForDictMixin for an\n      example.)  However, _validate() does not need to handle these.\n    '
    return self._get_value(entity)

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py Property._get_for_dict/original