Problem with literal arguments in the PATTERN string for a python 2to3 fixer
- by Zxaos
Hi folks. I'm writing a fixer for the 2to3 tool in python.
In my pattern string, I have a section where I'd like to match an empty string as an argument, or an empty unicode string. The relevant chunk of my pattern looks like:
(args='""' | args='u""')
My issue is the second option never matches. Even if it's alone, it won't match. However, if I simply say args=any and then output args, I can catch cases where args is exactly equal to the second option.
Is there some weird unicode handling thing going on? Why won't the second literal option ever match?