[Python-checkins] cpython (merge 3.6 -> default): Merge with 3.6

terry.reedy python-checkins at python.org
Sun Jan 1 21:22:06 EST 2017


https://hg.python.org/cpython/rev/91c15294a0ab
changeset:   105923:91c15294a0ab
parent:      105921:a80c14ace927
parent:      105922:62d3c0336df6
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Sun Jan 01 21:21:54 2017 -0500
summary:
  Merge with 3.6

files:
  Lib/idlelib/colorizer.py |  8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/Lib/idlelib/colorizer.py b/Lib/idlelib/colorizer.py
--- a/Lib/idlelib/colorizer.py
+++ b/Lib/idlelib/colorizer.py
@@ -21,8 +21,7 @@
     # 1st 'file' colorized normal, 2nd as builtin, 3rd as string
     builtin = r"([^.'\"\\#]\b|^)" + any("BUILTIN", builtinlist) + r"\b"
     comment = any("COMMENT", [r"#[^\n]*"])
-    stringprefix = (r"(\br|R|u|U|f|F|fr|Fr|fR|FR|rf|rF|Rf|RF"
-                    "|b|B|br|Br|bR|BR|rb|rB|Rb|RB)?")
+    stringprefix = r"(?i:\br|u|f|fr|rf|b|br|rb)?"
     sqstring = stringprefix + r"'[^'\\\n]*(\\.[^'\\\n]*)*'?"
     dqstring = stringprefix + r'"[^"\\\n]*(\\.[^"\\\n]*)*"?'
     sq3string = stringprefix + r"'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
@@ -262,10 +261,11 @@
     top = Toplevel(parent)
     top.title("Test ColorDelegator")
     x, y = map(int, parent.geometry().split('+')[1:])
-    top.geometry("600x200+%d+%d" % (x + 100, y + 175))
+    top.geometry("700x250+%d+%d" % (x + 20, y + 175))
     source = ("# Following has syntax errors\n"
         "if True: then int 1\nelif False: print 0\nelse: float(None)\n"
-        "#unicode and byte strings, valid prefixes should be colored\n"
+        "if iF + If + IF: 'keywork matching must respect case'\n"
+        "# All valid prefixes for unicode and byte strings should be colored\n"
         "'x', '''x''', \"x\", \"\"\"x\"\"\"\n"
         "r'x', u'x', R'x', U'x', f'x', F'x', ur'is invalid'\n"
         "fr'x', Fr'x', fR'x', FR'x', rf'x', rF'x', Rf'x', RF'x'\n"

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list