diff --git a/Nim-for-Python-Programmers.md b/Nim-for-Python-Programmers.md index bc1641c..62187cd 100644 --- a/Nim-for-Python-Programmers.md +++ b/Nim-for-Python-Programmers.md @@ -58,7 +58,7 @@ In Nim, arrays are much more strict. They are pass-by-value (meaning they're cop **Nim:** -```Nimrod +``` Nim proc foobar(z: array[0..3, int]) = z[5] = 5 # Error: Cannot assign to z echo z[5] # Error: Index out of bounds. @@ -90,7 +90,7 @@ It is possible to implement object-orientation features through libraries, thank Python-like object orientation example: -```Nim +``` Nim type Animal = ref object of RootObj age: int name: string @@ -153,7 +153,7 @@ echo a[0..1] # returns "he": ranges are inclusive! See the "Ranges" paragraph ### Python tuples -Nim Tuples are close to Python nametuples, see [manual](http://nim-lang.org/docs/manual.html#tuples-and-object-types). +Nim Tuples are close to Python nametuples, see [manual](http://nim-lang.org/docs/manual.html#types-tuples-and-object-types). Use Nim arrays: ``` Nim var a = ["hi", "there"] @@ -164,7 +164,7 @@ var c = ["hi", 1] # no mixed types please ### Python lists -Use [Nim sequences](http://nim-lang.org/docs/tut1.html#sequences) +Use [Nim sequences](http://nim-lang.org/docs/tut1.html#advanced-types-sequences) Nim arrays and sequences can hold only items of the same type.