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 leewz
Recipients ezio.melotti, leewz, mrabarnett
Date 2014-01-28.22:09:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390946978.37.0.473480948512.issue20426@psf.upfronthosting.co.za>
In-reply-to
Content
Compiling a regex with the `re.DEBUG` flag indicates that the user wants to see the debug output. `re.compile` is cached, though, so there is the possibility of no output.

Example:
import re
re.compile('1',re.DEBUG) #expected output
re.compile('1',re.DEBUG) #no output
re.compile('',re.DEBUG)  #no output (empty regex)

The workaround is to call `re.purge()`, which may remove other cached regexes that are still in use.

(Background: I wanted to check for equivalence of regexes, and a StackOverflow answer suggested comparing their `re.DEBUG`. http://stackoverflow.com/a/21398362/2963903)
History
Date User Action Args
2014-01-28 22:09:38leewzsetrecipients: + leewz, ezio.melotti, mrabarnett
2014-01-28 22:09:38leewzsetmessageid: <1390946978.37.0.473480948512.issue20426@psf.upfronthosting.co.za>
2014-01-28 22:09:38leewzlinkissue20426 messages
2014-01-28 22:09:38leewzcreate