Edited all URLs such that they include docs/ as all the documentation URLs have (presumably) changed on nim-lang.org
This commit is contained in:
parent
05472639bc
commit
32a374fa68
|
@ -10,11 +10,11 @@ This is a guide for people with experience in Python or a similar language.
|
||||||
The guide assumes some intermediate knowledge.
|
The guide assumes some intermediate knowledge.
|
||||||
|
|
||||||
The general tutorials can be found here:
|
The general tutorials can be found here:
|
||||||
http://nim-lang.org/tut1.html
|
http://nim-lang.org/docs/tut1.html
|
||||||
http://nim-lang.org/tut2.html
|
http://nim-lang.org/docs/tut2.html
|
||||||
|
|
||||||
The manual provides a more or less complete overview of the language:
|
The manual provides a more or less complete overview of the language:
|
||||||
http://nim-lang.org/manual.html
|
http://nim-lang.org/docs/manual.html
|
||||||
|
|
||||||
### At a glance
|
### At a glance
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ echo a[0..1] # returns "he": ranges are inclusive! See the "Ranges" paragraph
|
||||||
|
|
||||||
### Python tuples
|
### Python tuples
|
||||||
|
|
||||||
Nim Tuples are close to Python nametuples, see [manual](http://nim-lang.org/manual.html#tuples-and-object-types).
|
Nim Tuples are close to Python nametuples, see [manual](http://nim-lang.org/docs/manual.html#tuples-and-object-types).
|
||||||
Use Nim arrays:
|
Use Nim arrays:
|
||||||
``` Nim
|
``` Nim
|
||||||
var a = ["hi", "there"]
|
var a = ["hi", "there"]
|
||||||
|
@ -164,7 +164,7 @@ var c = ["hi", 1] # no mixed types please
|
||||||
|
|
||||||
### Python lists
|
### Python lists
|
||||||
|
|
||||||
Use [Nim sequences](http://nim-lang.org/tut1.html#sequences)
|
Use [Nim sequences](http://nim-lang.org/docs/tut1.html#sequences)
|
||||||
|
|
||||||
Nim arrays and sequences can hold only items of the same type.
|
Nim arrays and sequences can hold only items of the same type.
|
||||||
|
|
||||||
|
@ -183,14 +183,14 @@ echo lc[ y*2 | ( y <- x ), int ]
|
||||||
|
|
||||||
### Python sets
|
### Python sets
|
||||||
|
|
||||||
Python sets are not like [Nim set type](http://nim-lang.org/manual.html#set-type).
|
Python sets are not like [Nim set type](http://nim-lang.org/docs/manual.html#set-type).
|
||||||
If the values that will go in the set are known beforehand and finite, you can create an Enum for them.
|
If the values that will go in the set are known beforehand and finite, you can create an Enum for them.
|
||||||
Otherwise you can emulate a Python set using a [HashSet](http://nim-lang.org/sets.html).
|
Otherwise you can emulate a Python set using a [HashSet](http://nim-lang.org/docs/sets.html).
|
||||||
The Nim set type is faster and memory-efficient.
|
The Nim set type is faster and memory-efficient.
|
||||||
|
|
||||||
### Dictionaries
|
### Dictionaries
|
||||||
|
|
||||||
Use [Tables](http://nim-lang.org/tables.html) for Python dicts,
|
Use [Tables](http://nim-lang.org/docs/tables.html) for Python dicts,
|
||||||
OrderedTable for Python ordered dicts, and CountTable for Python's Counter.
|
OrderedTable for Python ordered dicts, and CountTable for Python's Counter.
|
||||||
|
|
||||||
``` Nim
|
``` Nim
|
||||||
|
|
Loading…
Reference in New Issue