From 3ab884a9e3a0c2845faac2c88cdd2042110a3339 Mon Sep 17 00:00:00 2001 From: mark-summerfield Date: Sun, 12 Mar 2017 16:40:14 +0000 Subject: 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. --- doc/tut1.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') 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 -- cgit 1.4.1-2-gfad0