a general class to define a physical unit and convert from this unit
to an appropriate SI unit.
|
|
__call__(self,
x)
Converts a value x in the physical unit self to SI |
|
|
Unit
or NotImplemented
|
__div__(self,
other)
Performs self*other operation for two Unit
objects |
|
|
|
|
__init__(self,
name,
longname,
a,
b)
initializes the physical unit |
|
|
Unit
or NotImplemented
|
__mul__(self,
other)
Performs self*other operation for two Unit
objects |
|
|
|
Unit
|
__pow__(self,
other)
Performs self**other operation |
|
|
|
Unit
or an arithmetic object
|
__rdiv__(self,
other)
Performs other/self operation |
|
|
|
Unit
of or an arithmetic object
|
__rmul__(self,
other)
Performs other*self operation |
|
|
|
|
|
str
|
getLongName(self)
Returns the long name of the physical unit |
|
|
str
|
getName(self)
Returns the name of the physical unit |
|
|
|
|
setLongName(self,
name)
Sets the long name of the physical unit |
|
|
|
|
setName(self,
name)
Sets the name of the physical unit |
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__
|