
sysconfig.py contains a pattern that breaks SRE:
Escaping the { and } fix this. This is a problem with the {xxx,yyy} notation for ranges; PCRE looks ahead, and treats it as a literal unless it's followed by digits of the right form. From pypcre.c: /* This function is called when a '{' is encountered in a place where it might start a quantifier. It looks ahead to see if it really is a quantifier or not. It is only a quantifier if it is one of the forms {ddd} {ddd,} or {ddd,ddd} where the ddds are digits. */ I suppose the goal of Perl compatibility means this magical behaviour needs to be preserved? --amk

andrew wrote:
I'm not so sure about this one; the $ behaviour is documented in Perl, but this isn't (as far as I can tell, at least). and since it's detected by the parser, it's probably better to change the sysconfig module... (fixing this in the sre_parser isn't exactly trivial, either...) </F>

andrew wrote:
I'm not so sure about this one; the $ behaviour is documented in Perl, but this isn't (as far as I can tell, at least). and since it's detected by the parser, it's probably better to change the sysconfig module... (fixing this in the sre_parser isn't exactly trivial, either...) </F>
participants (2)
-
A.M. Kuchling
-
Fredrik Lundh