cpython: 8a3807e15a1f (original) (raw)

Mercurial > cpython

changeset 93667:8a3807e15a1f 2.7

Benjamin Peterson benjamin@python.org
date Sun, 30 Nov 2014 11:47:54 -0500
parents fee117d5c894
children 961145c548e2 54af09408795
files Lib/re.py Lib/sre_parse.py Lib/test/test_re.py Misc/NEWS
diffstat 4 files changed, 12 insertions(+), 67 deletions(-)[+] [-] Lib/re.py 5 Lib/sre_parse.py 33 Lib/test/test_re.py 38 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/re.py +++ b/Lib/re.py @@ -312,11 +312,10 @@ class Scanner: s = sre_parse.Pattern() s.flags = flags for phrase, action in lexicon:

--- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py @@ -66,25 +66,24 @@ class Pattern: # master pattern object. keeps track of global attributes def init(self): self.flags = 0

class SubPattern: # a subpattern, in intermediate form @@ -179,21 +178,7 @@ class SubPattern: elif op in UNITCODES: lo = lo + 1 hi = hi + 1

@@ -672,7 +657,7 @@ def _parse(source, state): if not sourcematch(")"): raise error, "unbalanced parenthesis" if group is not None:

--- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -449,7 +449,7 @@ class ReTests(unittest.TestCase): self.assertEqual(re.match("a.*b", "a\n\nb", re.DOTALL).group(0), "a\n\nb")

@@ -463,42 +463,6 @@ class ReTests(unittest.TestCase): self.assertEqual(re.match(r"(a)(?!\s\1)", "a b").group(1), "a") self.assertEqual(re.match(r"(a)(?!\s(abc|a))", "a b").group(1), "a")

-

- def test_ignore_case(self): self.assertEqual(re.match("abc", "ABC", re.I).group(0), "ABC") self.assertEqual(re.match("abc", u"ABC", re.I).group(0), "ABC")

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -72,9 +72,6 @@ Library