Michael Lee and Sebastian Rittau
efb67946f8
Use variable annotations everywhere ( #2909 )
2019-04-13 10:40:52 +02:00
Chen Li and Sebastian Rittau
094974c3f5
[re] Add attribute '_pattern_type' to re. ( #2877 )
...
This is only available before python 3.7 based on:
https://github.com/python/cpython/blob/3.6/Lib/re.py#L283
https://github.com/python/cpython/blob/3.7/Lib/re.py
2019-03-20 01:20:24 +01:00
shahin and Jelle Zijlstra
d3a9650fa1
Fix return type of re.match, re.search ( #1886 )
2018-02-19 09:23:57 -08:00
Pieter-Jan Briers and Jelle Zijlstra
d7533152f9
(3.6+) Adds re.RegexFlag and use it. ( #1592 )
...
* Make 3.6 functions take Union[int, RegexFlag] instead.
2017-09-23 08:58:31 -04:00
Jelle Zijlstra and Guido van Rossum
89f27742ca
add re.template ( #1330 )
2017-05-24 14:07:31 -07:00
Jakub Stasiak and Guido van Rossum
44b367c7fe
Add re fullmatch() information ( #381 )
2016-07-26 07:43:29 -07:00
Scott G. Ainsworth and Guido van Rossum
82b9baed3b
Changed all regular expression findall() to return list[Any]. Findall() can return both list[AnyStr] and list[Tuple[AnyStr, AnyStr]]. ( #269 )
2016-06-05 17:50:12 -07:00
Guido van Rossum
3e37029bfe
Almost all re functions take a compiled pattern. (Even re.compile()!) ( #203 )
...
* Almost all re functions take a compiled pattern. (Even re.compile()!)
Fixes #188
Note: I'm using AnyStr so that the type of string used for pattern and
for the rest of the arguments must match. This is not 100% correct,
since Python 2 sometimes allows mixed types. But sometimes it
doesn't, depending on the values (e.g. non-ASCII bytes), and Python 3
always insists on matching, so I think this is actually a good idea.
* Same treatment for stdlib/3/re.pyi.
2016-05-16 11:25:59 -07:00
Matthias Kramm
94c9ce8fd0
Consistently use '= ...' for optional parameters.
2015-11-09 13:55:02 -08:00
Matthias Kramm
337abed05a
add (overwrite with) mypy stubs, if available
2015-09-30 09:59:44 -07:00