Updateable
Updateable
(Base) class that provides update() method for each class that inherits from this class.
Source code in emod_api/demographics/Updateable.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
add_parameter(key, value)
Adds a user defined key-value pair to demographics. :param key: Key :param value: Value :return: None
Source code in emod_api/demographics/Updateable.py
45 46 47 48 49 50 51 52 |
|
update(overlay_object, allow_nones=False)
Updates an object with the values from overlay_object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
overlay_object
|
[Updateable, Dict]
|
object with overriding attributes/values to apply to THIS object |
required |
allow_nones
|
bool
|
whether or not to apply/use attributes in overlay_object with value = None |
False
|
Returns:
Type | Description |
---|---|
None
|
Nothing |
Source code in emod_api/demographics/Updateable.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|