summary refs log tree commit diff stats
path: root/doc/tut1.rst
diff options
context:
space:
mode:
authormark-summerfield <mark@qtrac.eu>2017-03-12 16:40:14 +0000
committerAndreas Rumpf <rumpf_a@web.de>2017-03-12 17:40:14 +0100
commit3ab884a9e3a0c2845faac2c88cdd2042110a3339 (patch)
tree8bb3934c26fe3457e86cc082f8d53f02df147e31 /doc/tut1.rst
parent1be0022e7c6a8d168918998fd27412901432075d (diff)
downloadNim-3ab884a9e3a0c2845faac2c88cdd2042110a3339.tar.gz
Suggested small change to code (#5509)
In a code example I think it best to either use full names (index, item) or abbreviated names where that's common (i, item) but not non-standard abbreviations (indx, itm). So I've changed it to index, item since it is a tutorial, although i, item would be just as good.
Diffstat (limited to 'doc/tut1.rst')
-rw-r--r--doc/tut1.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/tut1.rst b/doc/tut1.rst
index e79214dee..9ebc80689 100644
--- a/doc/tut1.rst
+++ b/doc/tut1.rst
@@ -411,8 +411,8 @@ Other useful iterators for collections (like arrays and sequences) are
 * ``pairs`` and ``mpairs`` which provides the element and an index number (immutable and mutable respectively)
 
 .. code-block:: nim
-  for indx, itm in ["a","b"].pairs:
-    echo itm, " at index ", indx
+  for index, item in ["a","b"].pairs:
+    echo item, " at index ", index
   # => a at index 0
   # => b at index 1