Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: py3.5
Changeset: r95589:fc63a4a7eff5
Date: 2019-01-09 17:12 +0000
http://bitbucket.org/pypy/pypy/changeset/fc63a4a7eff5/

Log:    Remove unused parameter 'flags' from make_ctx()

diff --git a/pypy/module/_sre/interp_sre.py b/pypy/module/_sre/interp_sre.py
--- a/pypy/module/_sre/interp_sre.py
+++ b/pypy/module/_sre/interp_sre.py
@@ -169,7 +169,7 @@
             assert length >= 0
         return (length, unicodestr, string, buf)
 
-    def make_ctx(self, w_string, pos=0, endpos=sys.maxint, flags=0):
+    def make_ctx(self, w_string, pos=0, endpos=sys.maxint):
         """Make a StrMatchContext, BufMatchContext or a UnicodeMatchContext for
         searching in the given w_string object."""
         space = self.space
@@ -182,7 +182,6 @@
             endpos = pos
         elif endpos > length:
             endpos = length
-        flags = self.flags | flags
         #
         if unicodestr is not None:
             if self.is_known_bytes():
@@ -190,7 +189,7 @@
                             "can't use a bytes pattern on a string-like "
                             "object")
             return rsre_core.UnicodeMatchContext(unicodestr,
-                                                 pos, endpos, flags)
+                                                 pos, endpos, self.flags)
         else:
             if self.is_known_unicode():
                 raise oefmt(space.w_TypeError,
@@ -198,10 +197,10 @@
                             "object")
             if string is not None:
                 return rsre_core.StrMatchContext(string,
-                                                 pos, endpos, flags)
+                                                 pos, endpos, self.flags)
             else:
                 return rsre_core.BufMatchContext(buf,
-                                                 pos, endpos, flags)
+                                                 pos, endpos, self.flags)
 
     def getmatch(self, ctx, found):
         if found:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to