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 mamamiaibm
Recipients mamamiaibm
Date 2018-05-18.08:06:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526630765.64.0.682650639539.issue33566@psf.upfronthosting.co.za>
In-reply-to
Content
Firstly, I wrote something like this:

patn = r"\bROW\s*\((\d+|\*)\)(.|\s)*?\)"
    newlines = re.sub(patn, "\nYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\n", newlines)
but if the file(or string) ended without the expected ")" the code deadlock there, no progress, no exception, and no exit.

Then I changed it to :
 patn = r"\bROW\s*\((\d+|\*)\)(.|\s)*?(\)|$)"
    newlines = re.sub(patn, "\nYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\n", newlines) to enforce the rule of  end of file. then everything ok.

I felt this is a but, coz RE should not die, it should exit if can't match.

it is Py3.5 on ubuntu. Thanks!
History
Date User Action Args
2018-05-18 08:06:05mamamiaibmsetrecipients: + mamamiaibm
2018-05-18 08:06:05mamamiaibmsetmessageid: <1526630765.64.0.682650639539.issue33566@psf.upfronthosting.co.za>
2018-05-18 08:06:05mamamiaibmlinkissue33566 messages
2018-05-18 08:06:05mamamiaibmcreate