Updated Nim for Python Programmers (markdown)
This commit is contained in:
parent
fb065f5088
commit
d04062cdbe
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue