On Thursday, September 19, 2013 12:08:15 PM UTC-5, Edward K. Ream wrote: > This is a tricky task. One can't just use s.find to look for g.choose. Ditto for discovering the test, a and b args. Instead, the script must carefully parse Python strings, comments and parenthesized expressions.
> This kind of text munging is common. Perhaps its time to build a general purpose Python scanner class, or maybe it's time to use third-party tools. There are parallels with Rope's refactoring library. This morning I realized that 2to3 was designed to do something similar. I'll redo the script using 2to3 to see what the pros and cons are. I'm willing to put considerable effort into this script because it could be said to be a prototype for refactoring in Leo. EKR -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/groups/opt_out.
