def def_physical_type(unit, name):
 r = unit._get_physical_type_id()
 if (r in _physical_unit_mapping):
  raise ValueError(u'{0!r} ({1!r}) already defined as {2!r}'.format(r, name, _physical_unit_mapping[r]))
 _physical_unit_mapping[r] = name

def def_physical_type ( unit , name ) : r = unit . _get_physical_type_id ( ) if ( r in _physical_unit_mapping ) : raise ValueError ( u'{0!r} ({1!r}) already defined as {2!r}' . format ( r , name , _physical_unit_mapping [ r ] ) ) _physical_unit_mapping [ r ] = name
adds a new physical unit mapping .