[Python-Dev] Order of Fixers
David Wolever
wolever at cs.toronto.edu
Wed Mar 19 19:41:31 CET 2008
On 19-Mar-08, at 2:18 PM, Benjamin Peterson wrote:
> So, any better suggestions?
> I would create a list of fixers that need to go first in
> refactor.py and run those in order. If you wanted to get complex,
> you could add a requires member to fixes, but that is probably
> overkill.
Ok, so I was digging around a bit and there is the option to traverse
the tree in preorder or postorder. While the actual order does not
matter in this case, what does matter is that the preorder fixers are
run first -- so I've just dropped the print fixer in there (and
commented everything).
This isn't a great general solution... But, at the moment, there is
no need for it to be. If the need for a general solution arises,
that can be added :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20080319/4dd7cc55/attachment-0001.htm
More information about the Python-Dev
mailing list