summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-08-19 21:17:57 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-08-19 21:17:57 (GMT)
commitc1a723a0b300f036ba76c0370374ee2e455c2c52 (patch)
tree1b15fe90146d51bc8bcc6358de09d1f251a54ed9 /Lib
parent996c3deafe13235baf73f305e5eb4848f3f6ed2d (diff)
downloadcpython-c1a723a0b300f036ba76c0370374ee2e455c2c52.zip
cpython-c1a723a0b300f036ba76c0370374ee2e455c2c52.tar.gz
cpython-c1a723a0b300f036ba76c0370374ee2e455c2c52.tar.bz2
Idle ColorDelegator: remove special case code for 'as' in import statements.
'As' became a full keyword when with statements were added in 2.5/2.6.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/ColorDelegator.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/Lib/idlelib/ColorDelegator.py b/Lib/idlelib/ColorDelegator.py
index 729dec0..70a933a 100644
--- a/Lib/idlelib/ColorDelegator.py
+++ b/Lib/idlelib/ColorDelegator.py
@@ -32,7 +32,6 @@ def make_pat():
prog = re.compile(make_pat(), re.S)
idprog = re.compile(r"\s+(\w+)", re.S)
-asprog = re.compile(r".*?\b(as)\b")
class ColorDelegator(Delegator):
@@ -213,22 +212,6 @@ class ColorDelegator(Delegator):
self.tag_add("DEFINITION",
head + "+%dc" % a,
head + "+%dc" % b)
- elif value == "import":
- # color all the "as" words on same line, except
- # if in a comment; cheap approximation to the
- # truth
- if '#' in chars:
- endpos = chars.index('#')
- else:
- endpos = len(chars)
- while True:
- m1 = self.asprog.match(chars, b, endpos)
- if not m1:
- break
- a, b = m1.span(1)
- self.tag_add("KEYWORD",
- head + "+%dc" % a,
- head + "+%dc" % b)
m = self.prog.search(chars, m.end())
if "SYNC" in self.tag_names(next + "-1c"):
head = next