def __lshift__(self, other):
        """Override << operator"""
        if not isinstance(other, (CheckValue, MeasurementUnitRef)):
            raise ValueError(
                "RangeCheck cannot accept a {0} as a child element".format(
                    other.__class__.__name__
                )
            )

        self.set_single_attribute(other, CheckValue, "check_value")
        self.set_single_attribute(other, MeasurementUnitRef, "measurement_unit_ref")
def __lshift__ ( self , other ) : if not isinstance ( other , ( CheckValue , MeasurementUnitRef ) ) : raise ValueError ( "RangeCheck cannot accept a {0} as a child element" . format ( other . __class__ . __name__ ) ) self . set_single_attribute ( other , CheckValue , "check_value" ) self . set_single_attribute ( other , MeasurementUnitRef , "measurement_unit_ref" )
Override << operator