Author: Philip Jenvey <pjen...@underboss.org> Branch: py3k Changeset: r61564:af2f29a59d00 Date: 2013-02-21 12:56 -0800 http://bitbucket.org/pypy/pypy/changeset/af2f29a59d00/
Log: utilize the new rpython enumerate on strs diff --git a/pypy/module/__builtin__/compiling.py b/pypy/module/__builtin__/compiling.py --- a/pypy/module/__builtin__/compiling.py +++ b/pypy/module/__builtin__/compiling.py @@ -82,13 +82,11 @@ "string, bytes or code", consts.PyCF_SOURCE_IS_UTF8) # source.lstrip(' \t') - i = 0 - for c in source: + for i, c in enumerate(source): if c not in ' \t': if i: source = source[i:] break - i += 1 ec = space.getexecutioncontext() code = ec.compiler.compile(source, "<string>", 'eval', flags) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit