On Tue, Jun 21, 2011 at 3:12 PM, R. David Murray <rdmurray at bitdance.com> wrote: > On Tue, 21 Jun 2011 13:42:05 +0200, =?ISO-8859-1?Q?Tarek_Ziad=E9?= <ziade.tarek at gmail.com> wrote: >> Before I start to write my own refactoring tool, I was wondering if >> anyone here had some experience in this, and could give me some hints. > > Coul you could just write a 3to2 fixer? I don't know how hard it is to > run just a selected set of fixers (so that you could use it to generate > python3 code), but it seems to me that renaming modules is something > that 3to2 (and 2to3, of course) should be good at. The one thing rope is good at is to find where a given variable name is used, and rename all occurrences recursively. So basically, when you rename an import, it renames all the code that uses it. I don't really know how 2to3/3to2 work but I assumed that it does not do this, but simply give you a hook for every visited node. IOW that looking for dependencies is to be done Cheers Tarek > > -- > R. David Murray http://www.bitdance.com > -- Tarek Ziadé | http://ziade.org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4