def def_unit(s, represents=None, doc=None, format=None, prefixes=False, exclude_prefixes=[], namespace=None):
 if (represents is not None):
  result = Unit(s, represents, namespace=namespace, doc=doc, format=format)
 else:
  result = IrreducibleUnit(s, namespace=namespace, doc=doc, format=format)
 if prefixes:
  _add_prefixes(result, excludes=exclude_prefixes, namespace=namespace, prefixes=prefixes)
 return result

def def_unit ( s , represents = None , doc = None , format = None , prefixes = False , exclude_prefixes = [ ] , namespace = None ) : if ( represents is not None ) : result = Unit ( s , represents , namespace = namespace , doc = doc , format = format ) else : result = IrreducibleUnit ( s , namespace = namespace , doc = doc , format = format ) if prefixes : _add_prefixes ( result , excludes = exclude_prefixes , namespace = namespace , prefixes = prefixes ) return result
factory function for defining new units .