Lennart Regebro | 18 Nov 2010 15:03
Picon
Gravatar

Re: Pattern help!?

On Thu, Nov 18, 2010 at 15:00, Benjamin Peterson <benjamin@...> wrote:
> 2010/11/18 Lennart Regebro <regebro@...>:
>> I can't find a pattern that will match:
>>    foo
>> But not
>>    bar.foo
>>
>> Any hints?
>
> It's usually best to do something like "is_probably_builtin" in
> lib2to3/fixer_utils.py.

Ah, thanks! That's similar to what I did already, but I missed out on
this helper (as it's slightly weirdly named), and this one catches
several cases I didn't think of.

//Lennart

Gmane