@patch
def set_amount(self: Compound, amount):
pass
Compound
Fill in a module description here
States
State
State ()
Matter
Matter
Matter ()
Initialize self. See help(type(self)) for accurate signature.
All properties that a compound has always being governed by some laws.
Laws
MassMoleRatio
MassMoleRatio (compound)
Initialize self. See help(type(self)) for accurate signature.
Laws
Compound
Compound (formula:str)
Initialize self. See help(type(self)) for accurate signature.
Type | Details | |
---|---|---|
formula | str | the chemical formula |
Returns | None |
def set_mass():
pass
class A:
= [10, 20, 30]
COMPOUNDS def __init__(self):
self.compounds = [1, 2, 3]
class B(A):
= [40, 50, 60]
COMPOUNDS def __init__(self):
super().__init__()
self.compounds = [4, 5, 6]
@classmethod
def base(cls):
return cls.__bases__
= B() b
b.base()
(__main__.A,)
A.__bases__
(object,)
B.__bases__
(__main__.A,)
b.__dict__
{'compounds': [4, 5, 6]}
= Compound('H2O') H2O
H2O.__dict__
{'properties': {'mass': <exex.core.Mass>,
'mole': <exex.core.Mole>},
'laws': {'mass_mole_ratio': <__main__.MassMoleRatio>},
'time': None,
'system': None,
'add_laws': [__main__.MassMoleRatio],
'elements': [<chemlib.chemistry.Element>,
<chemlib.chemistry.Element>,
<chemlib.chemistry.Element>],
'formula': 'H₂O₁',
'_formula': 'H2O',
'coefficient': 1,
'occurences': {'H': 2, 'O': 1}}