def _check_fields ( self , x , y ) : if x is None : if self . x is None : self . err ( self . _check_fields , "X field is not set: please specify a parameter" ) return x = self . x if y is None : if self . y is None : self . err ( self . _check_fields , "Y field is not set: please specify a parameter" ) return y = self . y return x , y
python checking multiple fields
Check x and y fields parameters and initialize
def _check_fields(self, x, y):
		"""
		Check x and y fields parameters and initialize
		"""
		if x is None:
			if self.x is None:
				self.err(
					self._check_fields,
					"X field is not set: please specify a parameter")
				return
			x = self.x
		if y is None:
			if self.y is None:
				self.err(
					self._check_fields,
					"Y field is not set: please specify a parameter")
				return
			y = self.y
		return x, y