Module firkin :: Class SIFamily
[hide private]
[frames] | no frames]

Class SIFamily

source code

object --+    
    Family --+

Family that uses SI prefixes: If extended is True the folowing prefixes are added: For every prefix a unit is created.
>>> fam=SIFamily('m')
>>> fam.convert(1e8, 'mm', 'km')
(Decimal("100.000"), 'km')
>>> fam.autoconvert(3.65e-4, 'km')
(Decimal("365.0000"), 'mm')

Instance Methods [hide private]
__init__(self, base, name=None, extended=False)
source code

Inherited from Family: __contains__, __getitem__, __setitem__, add, autoconvert, convert

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, base, name=None, extended=False)

source code 
Overrides: Family.__init__
(inherited documentation)