lib2to3 pattern creation with unexpected results

Benjamin Peterson benjamin at python.org
Tue Dec 22 20:18:36 EST 2009


Zac Burns <zac256 <at> gmail.com> writes:
> I'm trying to match any function block, 
the two examples were just a part of
my unit tests.  

I know. I was just giving an example to indicate why it doesn't work.

find_pattern.py is useful because it gives you a base from which
it's easy to
extrapolate the general pattern.

> So, why should my change
have any effect?

Because the parser folds rules when they only have one child.







More information about the Python-list mailing list