Skip to content

Commit

Permalink
Flat dict fill documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Milan Falešník committed Aug 8, 2017
1 parent 62f0cb5 commit 239e088
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,31 @@ widgets or other browser operations operate within the widget's root element, el
of passing the parent element.


Simplified nested form fill
---------------------------

When you want to separate widgets into logical groups but you don't want to have a visual clutter in
the code, you can use dots in fill keys to signify the dictionary boundaries:

.. code-block:: python
# This:
view.fill({
'x': 1,
'foo.bar': 2,
'foo.baz': 3,
})
# Is equivalent to this:
view.fill({
'x': 1,
'foo': {
'bar': 2,
'baz': 3,
}
})
.. `Version picking`:
Version picking
Expand Down

0 comments on commit 239e088

Please sign in to comment.