From d04062cdbebd416c761eb02014c7b69e8adbfd60 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Sun, 12 Apr 2015 00:57:38 +0100 Subject: [PATCH] Updated Nim for Python Programmers (markdown) --- Nim-for-Python-Programmers.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Nim-for-Python-Programmers.md b/Nim-for-Python-Programmers.md index 4828b4b..ce31d73 100644 --- a/Nim-for-Python-Programmers.md +++ b/Nim-for-Python-Programmers.md @@ -148,7 +148,14 @@ The Nim set type is faster and memory-efficient. ### Dictionaries -Use [Tables](http://nim-lang.org/tables.html) +Use [Tables](http://nim-lang.org/tables.html) for Python dicts, +OrderedTable for Python ordered dicts, and CountTable for Python's Counter. + +``` Nim +var a = {"hi": 1, "there": 2}.toTable +echo a["hi"], " ", a.len +assert a.hasKey("hi") +``` ### ABC