homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author triquetra011
Recipients ezio.melotti, mrabarnett, triquetra011
Date 2013年04月08日.18:18:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za>
In-reply-to
Content
Tested in 2.7 but possibly affects the other versions as well.
A real life example (note the first character '>' being lost):
>>> import re
>>> re.split(r'^>(.*)$', '>Homo sapiens catenin (cadherin-associated)')
produces:
['', 'Homo sapiens catenin (cadherin-associated)', '']
Expected (and IMHO most useful) behaviour would be for it to return:
['', '>Homo sapiens catenin (cadherin-associated)', '']
or (IMHO much less useful as one can already get this one just by adding external grouping parentheses and it is ):
['', '>Homo sapiens catenin (cadherin-associated)', 'Homo sapiens catenin (cadherin-associated)', '']
Not sure whether it can be changed in such a mature and widely used module without breaking compatibility but just adding a new optional parameter for deciding how re.split() deals with patterns containing grouping parentheses and making it default to the current behaviour would be very helpful.
Best Regards
History
Date User Action Args
2013年04月08日 18:18:58triquetra011setrecipients: + triquetra011, ezio.melotti, mrabarnett
2013年04月08日 18:18:58triquetra011setmessageid: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za>
2013年04月08日 18:18:58triquetra011linkissue17668 messages
2013年04月08日 18:18:58triquetra011create

AltStyle によって変換されたページ (->オリジナル) /