python - How to fetch method call using a custom migration fixer in lib2to3? -


i trying create custom migration fixer lib2to3. idea of fixer fetch specific constructions, such as:

a.b() 

we have tried using script called find_pattern.py, no luck far. output following:

power< 'a' trailer< '.' 'b' > trailer< '(' ')' > > 

but unfortunately, might have guessed - doesn't work. pattern basefix should use?

this pattern needs prepared.

pattern = '''     power< head=any+      trailer< '.' method=any >      parens=trailer< '(' tail=[argument | arglist] ')'>      > ''' 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -