(self, obj, k, v, want_type)
Verify an object is of a given type or can be serialized INTO that type.
Verify an object is of a given type or can be serialized INTO that type.
Verify an object is of a given type or can be serialized INTO that type .
def _type_check_object(self, obj, k, v, want_type):
        """
        Verify an object is of a given type or can be serialized INTO that type.
        """

        vt = type(v)
        if issubclass(vt, Lookup):
            # this will be computed later in the provider
            return
        if self.allow_none and v is None:
            return
        if vt == want_type or issubclass(vt, want_type):
            return        
        if k == 'items' and vt == list:
            return
        raise Exception("%s, field %s, expecting a data member of type %s, got %s" % (obj, k, want_type, vt))
def _type_check_object ( self , obj , k , v , want_type ) : vt = type ( v ) if issubclass ( vt , Lookup ) : # this will be computed later in the provider return if self . allow_none and v is None : return if vt == want_type or issubclass ( vt , want_type ) : return if k == 'items' and vt == list : return raise Exception ( "%s, field %s, expecting a data member of type %s, got %s" % ( obj , k , want_type , vt ) )