Skip to content

Commit

Permalink
Update collections.rst (#181)
Browse files Browse the repository at this point in the history
Little change to how import is written to make it consistent with rest of examples
  • Loading branch information
jpastuszuk authored and yasoob committed Nov 30, 2018
1 parent c20b5a8 commit b0b6643
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ share a solution using ``defaultdict``.

.. code:: python
import collections
tree = lambda: collections.defaultdict(tree)
from collections import defaultdict
tree = lambda: defaultdict(tree)
some_dict = tree()
some_dict['colours']['favourite'] = "yellow"
# Works fine
Expand Down

0 comments on commit b0b6643

Please sign in to comment.