New submission from Bobby Xiao <[EMAIL PROTECTED]>:
Under http://docs.python.org/dev/3.0/whatsnew/3.0.html#new-syntax, on
the last two points, it says
"# New binary literals, e.g. 0b1010 (already in 2.6).
# Bytes literals are introduced with a leading b or B, and there is a
new co
Bobby Xiao added the comment:
How would I apply that workaround to my example?
re.sub("foo(?:b(ar)|baz)","\\1","foobaz")
___
Python tracker
<ht
Bobby Xiao added the comment:
Well, in this example the group (ar) is unmatched, so sre throws the
error, and because of the alternation, the workaround you mentioned
doesn't seem to directly apply.
A better example is probably
re.sub("foo(?:b(ar)|foo)","\\1","
Bobby Xiao added the comment:
It was so long ago, I've since redone half my codebase (the hack is
still there, but I can't remember what it was meant to replace now :( ).
Sorry about that.
___
Python tracker
<http://bugs.python.org
Bobby Xiao added the comment:
I'm glad to see that the unmatched group issue is finally being addressed.
Thanks!
--
nosy: +nneonneo
___
Python tracker
<http://bugs.python.org/i