def __init__(self, value, unit=None, space=" "):
    self._space = space
    if unit is not None:
      self.value = float(value)
      self.unit = _findUnit(unit)
    else:
      if isinstance(value, basestring):
        match = PhysicalQuantity._NUMBER_RE.match(value)
        if match is None:
          raise TypeError('Not a number or number with unit')
        self.value = float(match.group(1))
        self._space = match.group(2)
        self.unit = _findUnit(match.group(3))
      elif isinstance(value, PhysicalQuantity):
        self.value = value.value
        self.unit = value.unit
        self._space = value._space
      elif isinstance(value, tuple):
        self.value = float(value[0])
        self.unit = _findUnit(value[1])
        try:
          self._space = value[2]
        except __HOLE__:
          pass
      else:
        raise ValueError("PhysicalQuantity can't use {!r}".format(value))
dataset/ETHPy150Open kdart/pycopia/core/pycopia/physics/physical_quantities.py/PhysicalQuantity.__init__