Skip to content

Commit b0b6643

Browse files
jpastuszukyasoob
authored andcommitted
Update collections.rst (yasoob#181)
Little change to how import is written to make it consistent with rest of examples
1 parent c20b5a8 commit b0b6643

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

collections.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ share a solution using ``defaultdict``.
6868

6969
.. code:: python
7070
71-
import collections
72-
tree = lambda: collections.defaultdict(tree)
71+
from collections import defaultdict
72+
tree = lambda: defaultdict(tree)
7373
some_dict = tree()
7474
some_dict['colours']['favourite'] = "yellow"
7575
# Works fine

0 commit comments

Comments
 (0)