summaryrefslogtreecommitdiffstats
path: root/Lib/codeop.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 08:56:30 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 08:56:30 (GMT)
commit6b71e747b19c41e0665ee14eb755c924a40dd774 (patch)
treeba208a6616870c43672678ad07b772435aef6fa0 /Lib/codeop.py
parent141971f22a1269e782b1481779f766629ac83afc (diff)
downloadcpython-6b71e747b19c41e0665ee14eb755c924a40dd774.zip
cpython-6b71e747b19c41e0665ee14eb755c924a40dd774.tar.gz
cpython-6b71e747b19c41e0665ee14eb755c924a40dd774.tar.bz2
String method conversion.
Diffstat (limited to 'Lib/codeop.py')
-rw-r--r--Lib/codeop.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/codeop.py b/Lib/codeop.py
index 46926b5..3865ec6 100644
--- a/Lib/codeop.py
+++ b/Lib/codeop.py
@@ -1,7 +1,6 @@
"""Utility to compile possibly incomplete Python source code."""
import sys
-import string
import traceback
__all__ = ["compile_command"]
@@ -49,8 +48,8 @@ def compile_command(source, filename="<input>", symbol="single"):
"""
# Check for source consisting of only blank lines and comments
- for line in string.split(source, "\n"):
- line = string.strip(line)
+ for line in source.split("\n"):
+ line = line.strip()
if line and line[0] != '#':
break # Leave it alone
else: