andrew cooke <and...@acooke.org> added the comment:

I hope the above is clear enough (you need to stare at the regexps for a time) 
- basically, lookback with a group conditional is not as expected (it appears 
to be evaluated as lookahead?).  Also, some patterns compile that probably 
shouldn't.

The re package only supports (according to the docs) lookback on expressions 
whose length is known.  So I guess it's also possible that (?(n)pat1|pat2) 
should always fail that, even when len(pat1) = len(pat2)?

Also, the generally excellent unit tests for the re package don't have much 
coverage for lookback (I am writing my own regexp lib and it passes all the re 
unit tests but had a similar bug - that's how I found this one...).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9179>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to