From 0f9fcd456b9642a9f9d730624d3686c81ae72ad1 Mon Sep 17 00:00:00 2001 From: Jakub Pastuszuk Date: Fri, 30 Nov 2018 09:38:13 +0100 Subject: [PATCH] Update collections.rst Little change to how import is written to make it consistent with rest of examples --- collections.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collections.rst b/collections.rst index c09a3bf..faac5dd 100644 --- a/collections.rst +++ b/collections.rst @@ -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