[issue3262] re.split doesn't split with zero-width regex

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405692 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue3262] re.split doesn't split with zero-width regex

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -ahmedsayeed1982 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue3262] re.split doesn't split with zero-width regex

2021-11-04 Thread Ahmed Sayeed
Ahmed Sayeed added the comment: Minimal testcase: http://www.compilatori.com/category/computers/ .align 8 .globl main http://www.acpirateradio.co.uk/category/property/ .globl insn .type main, @function http://www.logoarts.co.uk/category/services/ .type

[issue3262] re.split doesn't split with zero-width regex

2017-12-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4589 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue3262] re.split doesn't split with zero-width regex

2017-11-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4406 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue3262] re.split doesn't split with zero-width regex

2010-08-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue3262] re.split doesn't split with zero-width regex

2010-04-26 Thread Matthew Barnett
Matthew Barnett added the comment: You could try the regex module mentioned in issue 2636. -- ___ Python tracker ___ ___ Python-bugs-l

[issue3262] re.split doesn't split with zero-width regex

2010-04-26 Thread Tim Pietzcker
Tim Pietzcker added the comment: Sorry to revive this dormant (?) topic - has anybody brought this any further? This "feature" has tripped me up a few times, and I would be all for adding a flag to enable the "split on zero-size matches" behavior, but I myself am not competent enough to code

[issue3262] re.split doesn't split with zero-width regex

2008-09-22 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: The problem with doing this per 3.0 is that it's impossible to write a conversion script. I'm okay with adding a flag to enable this behavior though. Please open a new bug with a new patch, preferably one that applies cleanly to the trunk,

[issue3262] re.split doesn't split with zero-width regex

2008-09-22 Thread Jeffrey C. Jacobs
Jeffrey C. Jacobs <[EMAIL PROTECTED]> added the comment: I think Mike Coleman proposal of enabling this behaviour via flag is probably best and IMHO we should consider it under these circumstances. Intuitively, I think you're interpretation of what re.split should do under zero-width conditions

[issue3262] re.split doesn't split with zero-width regex

2008-09-21 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I wonder whether it could be put into Python 3 where certain breaks in backwards compatibility are to be expected. ___ Python tracker <[EMAIL PROTECTED]>

[issue3262] re.split doesn't split with zero-width regex

2008-09-21 Thread Jeffrey C. Jacobs
Changes by Jeffrey C. Jacobs <[EMAIL PROTECTED]>: -- nosy: +timehorse ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list ma

[issue3262] re.split doesn't split with zero-width regex

2008-08-05 Thread Mike Coleman
Mike Coleman <[EMAIL PROTECTED]> added the comment: Okay. For what it's worth, note that my original 2004 patch for this (#988761) is completely backward compatible (a flag must be set in the call to get the new behavior). ___ Python tracker <[EMAIL PROTECTED

[issue3262] re.split doesn't split with zero-width regex

2008-08-05 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: I think it's better to leave this alone. Such a subtle change is likely to trip over more people in worse ways than the alleged "bug". -- resolution: -> rejected ___ Python tracker <[EMAIL PROT

[issue3262] re.split doesn't split with zero-width regex

2008-07-16 Thread Mike Coleman
Mike Coleman <[EMAIL PROTECTED]> added the comment: I think it's probably both. The original design was incorrect, though this probably wasn't apparent to the designer. But as a significant user of 're', it really stands out as a problem. ___ Python tracker

[issue3262] re.split doesn't split with zero-width regex

2008-07-08 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: There appear to be 2 opinions on this issue: 1. It's a bug, a corner case that got missed. 2. It's always been like this, so it's probably a design decision, although no-one can't point to where or when the decision was made... Looking at

[issue3262] re.split doesn't split with zero-width regex

2008-07-07 Thread Mike Coleman
Mike Coleman <[EMAIL PROTECTED]> added the comment: I don't want to discourage you, but #852532, which is essentially the same bug report, was closed--without explanation--as 'wont fix' in April, after four-plus years. I wish you good luck--this is an important and irritating bug, in my opinion.

[issue3262] re.split doesn't split with zero-width regex

2008-07-07 Thread Mike Coleman
Changes by Mike Coleman <[EMAIL PROTECTED]>: -- nosy: +mkc ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing list

[issue3262] re.split doesn't split with zero-width regex

2008-07-07 Thread Filip Salomonsson
Changes by Filip Salomonsson <[EMAIL PROTECTED]>: -- nosy: +filip ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailin

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
Changes by Matthew Barnett <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10794/split_zero_width.diff ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: New patch version after studying #988761 and doing more testing. Added file: http://bugs.python.org/file10797/split_zero_width_2.diff ___ Python tracker <[EMAIL PROTECTED]>

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I've found that this issue has been discussed before: #988761. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: Probably by design. There's probably even a unittest for this behavior. -- nosy: +gvanrossum ___ Python tracker <[EMAIL PROTECTED]>

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: The attached patch appears to work. -- keywords: +patch Added file: http://bugs.python.org/file10794/split_zero_width.diff ___ Python tracker <[EMAIL PROTECTED]>

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
New submission from Matthew Barnett <[EMAIL PROTECTED]>: re.split doesn't split a string when the regex matches a zero characters. For example: re.split(r'\b', 'a b') returns ['a b'] instead of ['', 'a', ' ', 'b', '']. re.split(r'(? __