Author: Philip Jenvey <pjen...@underboss.org> Branch: py3k Changeset: r68323:219abd35c165 Date: 2013-11-25 15:05 -0800 http://bitbucket.org/pypy/pypy/changeset/219abd35c165/
Log: utilize rpython's new lstrip 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 @@ -81,15 +81,9 @@ source, flags = source_as_str(space, w_prog, 'eval', "string, bytes or code", consts.PyCF_SOURCE_IS_UTF8) - # source.lstrip(' \t') - for i, c in enumerate(source): - if c not in ' \t': - if i: - source = source[i:] - break - ec = space.getexecutioncontext() - code = ec.compiler.compile(source, "<string>", 'eval', flags) + code = ec.compiler.compile(source.lstrip(' \t'), "<string>", 'eval', + flags) # XXX: skip adding of __builtins__ to w_globals. it requires a # costly gettopframe_nohidden() here and nobody seems to miss its _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit