if isinstance(constant, Constant):
constant = constant.constant
if not isinstance(constant, numbers.Rational):
raise TypeError('constant must be a rational number '
'or a Constant instance')
self._constant = constant
if isinstance(constant, Constant):
constant = constant.constant
if not isinstance(constant, numbers.Rational):
raise TypeError('constant must be a rational number '
'or a Constant instance')
self._constant = constant