Removed a code for suport Python version <2.2.
This commit is contained in:
parent
20b39b27d9
commit
be4de52fb1
15
Lib/re.py
15
Lib/re.py
|
@ -124,10 +124,13 @@ import sre_compile
|
|||
import sre_parse
|
||||
|
||||
# public symbols
|
||||
__all__ = [ "match", "fullmatch", "search", "sub", "subn", "split", "findall",
|
||||
"compile", "purge", "template", "escape", "A", "I", "L", "M", "S", "X",
|
||||
"U", "ASCII", "IGNORECASE", "LOCALE", "MULTILINE", "DOTALL", "VERBOSE",
|
||||
"UNICODE", "error" ]
|
||||
__all__ = [
|
||||
"match", "fullmatch", "search", "sub", "subn", "split",
|
||||
"findall", "finditer", "compile", "purge", "template", "escape",
|
||||
"error", "A", "I", "L", "M", "S", "X", "U",
|
||||
"ASCII", "IGNORECASE", "LOCALE", "MULTILINE", "DOTALL", "VERBOSE",
|
||||
"UNICODE",
|
||||
]
|
||||
|
||||
__version__ = "2.2.1"
|
||||
|
||||
|
@ -205,9 +208,7 @@ def findall(pattern, string, flags=0):
|
|||
Empty matches are included in the result."""
|
||||
return _compile(pattern, flags).findall(string)
|
||||
|
||||
if sys.hexversion >= 0x02020000:
|
||||
__all__.append("finditer")
|
||||
def finditer(pattern, string, flags=0):
|
||||
def finditer(pattern, string, flags=0):
|
||||
"""Return an iterator over all non-overlapping matches in the
|
||||
string. For each match, the iterator returns a match object.
|
||||
|
||||
|
|
Loading…
Reference in New Issue