[pypy-commit] pypy py3.5: Remove unused parameter 'flags' from make_ctx()
rlamy
pypy.commits at gmail.com
Wed Jan 9 12:13:18 EST 2019
Author: Ronan Lamy <ronan.lamy at 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:
More information about the pypy-commit
mailing list