Skip to content

Commit

Permalink
added hint in container documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
timrid authored and arekbulski committed May 22, 2021
1 parent 352bf42 commit 031049e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/basics.rst
Expand Up @@ -127,6 +127,14 @@ Thanks to blapid, containers can also be searched. Structs nested within Structs
>>> con.search_all("a")
[1, 2]

Note that not all parameters can be accessed via the dot operator. If the name of an item matches a method name of the Container (which is based on a dict), it can only be accessed via the square brackets. This includes the following names: clear, copy, fromkeys, get, items, keys, move_to_end, pop, popitem, search, search_all, setdefault, update, values.

>>> con = Container(update=5)
>>> con["update"]
5
>>> con.update # not usable via dot access
<bound method Container.update of Container(update=5)>


Nesting and embedding
---------------------
Expand Down

0 comments on commit 031049e

Please sign in to comment.