Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Commit

Permalink
Merge pull request #26 from tedlandis/readme_typos
Browse files Browse the repository at this point in the history
typos in readme.rst
  • Loading branch information
bcj committed Apr 9, 2015
2 parents 57332f9 + 293a3ca commit ac01cda
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ to be accessed both as keys and as attributes::
> a['foo']
'bar'

With this, you can easily create convenient, heirarchical settings
With this, you can easily create convenient, hierarchical settings
objects.

::
Expand Down Expand Up @@ -115,7 +115,7 @@ dynamically access any key as an attribute)::

Merging
-------
AttrDicts can be merged with eachother or other dict objects using the
AttrDicts can be merged with each other or other dict objects using the
``+`` operator. For conflicting keys, the right dict's value will be
preferred, but in the case of two dictionary values, they will be
recursively merged::
Expand All @@ -137,15 +137,15 @@ Sequences
By default, items in non-string Sequences (e.g. lists, tuples) will be
converted to AttrDicts::

> adict = AttrDict({'list': [{'value': 1}, 'value': 2]})
> adict = AttrDict({'list': [{'value': 1}, {'value': 2}]})
> for element in adict.list:
> element.value
1
2

This will not occur if you access the AttrDict as a dictionary::

> adict = AttrDict({'list': [{'value': 1}, 'value': 2]})
> adict = AttrDict({'list': [{'value': 1}, {'value': 2}]})
> for element in adict['list']:
> isinstance(element, AttrDict)
False
Expand All @@ -154,8 +154,8 @@ This will not occur if you access the AttrDict as a dictionary::
To disable this behavior globally, pass the attribute ``recursive=False`` to
the constructor::

> adict = AttrDict({'list': [{'value': 1}, 'value': 2]}, recursive=False)
> for element in adict['list']:
> adict = AttrDict({'list': [{'value': 1}, {'value': 2}]}, recursive=False)
> for element in adict.list:
> isinstance(element, AttrDict)
False
False
Expand Down Expand Up @@ -191,7 +191,7 @@ easier::
settings = load('settings.json')

By default, ``load`` uses ``json.load`` to load the settings file, but this can
be overrided by passing ``load_function=YOUR_LOAD_FUNCTION``.
be overridden by passing ``load_function=YOUR_LOAD_FUNCTION``.

``load`` supports loading from multiple files at once. This allows for
overriding of default settings, e.g.::
Expand Down

0 comments on commit ac01cda

Please sign in to comment.