[pypy-svn] r8973 - pypy/dist/pypy/tool
tismer at codespeak.net
tismer at codespeak.net
Tue Feb 8 09:50:32 CET 2005
Author: tismer
Date: Tue Feb 8 09:50:32 2005
New Revision: 8973
Modified:
pypy/dist/pypy/tool/sourcetools.py
Log:
NiceCompile is probably not limited to functions any
longer, but should compile everything.
Modified: pypy/dist/pypy/tool/sourcetools.py
==============================================================================
--- pypy/dist/pypy/tool/sourcetools.py (original)
+++ pypy/dist/pypy/tool/sourcetools.py Tue Feb 8 09:50:32 2005
@@ -50,8 +50,7 @@
""" instance NiceCompile (src, args) -- formats src with args
and returns a code object ready for exec. Instead of <string>,
the code object has correct co_filename and line numbers.
- Note that this is meant for function definitions, only.
- The statemens may be left aligned.
+ Indentation is automatically corrected.
"""
if self.srctext:
p = self.srctext.index(src)
@@ -63,7 +62,7 @@
content = line.strip()
if content and not content.startswith('#'):
break
- # see if firstline is indented
+ # see if first line is indented
if line and line[0].isspace():
# fake a block
prelines -= 1
More information about the Pypy-commit
mailing list