Skip to content

Commit

Permalink
fix a bug in example code in README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
ssato committed Apr 21, 2015
1 parent 115e5bc commit ff67c84
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,22 @@ This should be accomplished by a few lines of code:
import anyconfig
conf = anyconfig.container(foo=0, bar='1', baz=[2, 3]) # Default values
default = dict(foo=0, bar='1', baz=[2, 3]) # Default values
conf = anyconfig.container(default) # or: anyconfig.container(**default)
conf_from_files = anyconfig.load("/path/to/config_files_dir/*.yml")
conf.update(**conf_from_files)
conf.update(conf_from_files)
# Use `conf` ...
or:

.. code-block:: python
default = dict(foo=0, bar='1', baz=[2, 3])
conf = anyconfig.container(default)
conf.update(anyconfig.load("/path/to/config_files_dir/*.yml"))
Build & Install
================

Expand Down

0 comments on commit ff67c84

Please sign in to comment.