Author joente
Recipients joente
Date 2015-11-05.08:27:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446712064.78.0.0396170354874.issue25554@psf.upfronthosting.co.za>
In-reply-to
Content
When compiling a regular expression with groups (subpatterns), 
circular references are created.
Here is an example to illustrate the problem:

>>> import gc
>>> import re
>>> gc.disable() # disable garbage collector
>>> gc.collect() # make sure we start with 0
0
>>> re.compile('(a|b)') # compile something with groups
re.compile('(a|b)')
>>> gc.collect() # collects x objects depending on the compiled string
11


To fix the issue a weakref object for p is used.
History
Date User Action Args
2015-11-05 08:27:44joentesetrecipients: + joente
2015-11-05 08:27:44joentesetmessageid: <1446712064.78.0.0396170354874.issue25554@psf.upfronthosting.co.za>
2015-11-05 08:27:44joentelinkissue25554 messages
2015-11-05 08:27:44joentecreate