Message340960
| Author |
malin |
| Recipients |
Alexander.Schmolck, malin, mrabarnett, serhiy.storchaka |
| Date |
2019年04月27日.02:37:04 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1556332624.47.0.0123601311163.issue10328@roundup.psfhosted.org> |
| In-reply-to |
| Content |
This bug was fixed in Python 3.7, see issue32308.
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] on win32
>>> re.compile('(?m)(?P<trailing_ws>[ \t]+\r*$)|(?P<no_final_newline>(?<=[^\n])\Z)').subn(lambda m:next('<'+k+'>' for k,v in m.groupdict().items() if v is not None), 'foobar ')
('foobar<trailing_ws>', 1)
Python 3.7.3rc1 (tags/v3.7.3rc1:69785b2127, Mar 12 2019, 22:37:55) [MSC v.1916 64 bit (AMD64)] on win32
>>> re.compile('(?m)(?P<trailing_ws>[ \t]+\r*$)|(?P<no_final_newline>(?<=[^\n])\Z)').subn(lambda m:next('<'+k+'>' for k,v in m.groupdict().items() if v is not None), 'foobar ')
('foobar<trailing_ws><no_final_newline>', 2) |
|