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

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -