diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bcd9a3..50d6f3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). - `reconfigure`: - `update()` now supports `list(tuple(str, any))` for ordered addition of multiple parameters. +### Updated +- Readme now contains details about `update()`. + ## 0.5.0 - 2022-03-22 ### Added - `reconfigure`: diff --git a/README.md b/README.md index 88babe3..31e664d 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,23 @@ P.anotherparam = {'default': 5.2, 'min': 2, 'max': 6, 'description': 'I am just P.smax = ["Speed_max", float, 0, "Level-1 speed", 0.158483034, 0, 0.3] ``` +Parameters may be also defined at once using function `P.update(PARAMETERS)`. There are two ways to use it: + +- Using dictionary (parameters are ordered randomly): + ```python + PARAMETERS = { + "something": 4, + "anotherparam": {'default': 5.2, 'min': 2, 'max': 6, 'description': 'I am just a float.'}, + } + ``` +- Using list of tuples (parameters are ordered): + ```python + PARAMETERS = [ + ("something", 4), + ("anotherparam", {'default': 5.2, 'min': 2, 'max': 6, 'description': 'I am just a float.'}), + ] + ``` + ##### Enumerated values Example: