diff options
author | Sarah Owens <sarato@inkylabs.com> | 2012-11-01 13:36:50 -0700 |
---|---|---|
committer | Sarah Owens <sarato@inkylabs.com> | 2012-11-01 13:36:50 -0700 |
commit | a6053d54f1178dc527b383844972c6077ee91a4e (patch) | |
tree | 24038d692a1db41c400c9d40da9ac6b5ccfaaa7a /subcmds/stage.py | |
parent | e072a92a9bb9fdf61bbd1df4e8864f8fd52d5a82 (diff) | |
download | git-repo-a6053d54f1178dc527b383844972c6077ee91a4e.tar.gz |
Change usages of xrange() to range()
In Python3, range() creates a generator rather than a list.
None of the parameters in the ranges changed looked large enough
to create an impact in memory in Python2. Note: the only use of
range() was for iteration and did not need to be changed.
This is part of a series of changes to introduce Python3 support.
Change-Id: I50b665f9296ea160a5076c71f36a65f76e47029f
Diffstat (limited to 'subcmds/stage.py')
-rw-r--r-- | subcmds/stage.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subcmds/stage.py b/subcmds/stage.py index 2ec48069..1ff85880 100644 --- a/subcmds/stage.py +++ b/subcmds/stage.py | |||
@@ -58,7 +58,7 @@ The '%prog' command stages files to prepare the next commit. | |||
58 | out.header(' %s', 'project') | 58 | out.header(' %s', 'project') |
59 | out.nl() | 59 | out.nl() |
60 | 60 | ||
61 | for i in xrange(0, len(all_projects)): | 61 | for i in range(len(all_projects)): |
62 | p = all_projects[i] | 62 | p = all_projects[i] |
63 | out.write('%3d: %s', i + 1, p.relpath + '/') | 63 | out.write('%3d: %s', i + 1, p.relpath + '/') |
64 | out.nl() | 64 | out.nl() |