Message234263
| Author |
serhiy.storchaka |
| Recipients |
ezio.melotti, mrabarnett, pitrou, serhiy.storchaka |
| Date |
2015年01月18日.18:20:38 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1421605238.49.0.672618974228.issue22818@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Because users expect that split() supports zero-width patterns (as sub() supports them) and regexps in other languages support splitting on zero-width patterns. This looks as accidental implementation detail (see my patch in issue22817 -- the difference is pretty small) frozen in the ages for backward compatibility. We can't change this behavior in maintained releases because this will break mach code which accidentally use zero-width patterns. But we can change it in future as new feature, after deprecating current behavior. This would be very useful feature. For example it would allow to simplify and speed up the regex used for splitting on hyphens in textwrap (something like r'(?<=\w-)(?=\w)'). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年01月18日 18:20:38 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, ezio.melotti, mrabarnett |
| 2015年01月18日 18:20:38 | serhiy.storchaka | set | messageid: <1421605238.49.0.672618974228.issue22818@psf.upfronthosting.co.za> |
| 2015年01月18日 18:20:38 | serhiy.storchaka | link | issue22818 messages |
| 2015年01月18日 18:20:38 | serhiy.storchaka | create |
|