Following up on yesterday's conversation about 2to3 and 3to2, I wonder if it's easily possible to run 2to3 with a specific small subset of its fixers? For example, people not wanting to make the 2->3 leap yet might still be interersted in the exception handling changes ("except Foo as exc")? Thx, -- Skip Montanaro - skip@pobox.com - http://www.smontanaro.net/
2009/3/27
Following up on yesterday's conversation about 2to3 and 3to2, I wonder if it's easily possible to run 2to3 with a specific small subset of its fixers? For example, people not wanting to make the 2->3 leap yet might still be interersted in the exception handling changes ("except Foo as exc")?
Sure, that's easily possible: run 2to3 -f some_fixer,other_fixer,this_fixer,that_fixer. You can get a full list of fixers using the --list-fixes option. Collin Winter
2009/3/27 Collin Winter
2009/3/27
: Following up on yesterday's conversation about 2to3 and 3to2, I wonder if it's easily possible to run 2to3 with a specific small subset of its fixers? For example, people not wanting to make the 2->3 leap yet might still be interersted in the exception handling changes ("except Foo as exc")?
Sure, that's easily possible: run 2to3 -f some_fixer,other_fixer,this_fixer,that_fixer. You can get a full list of fixers using the --list-fixes option.
In addition you can use the -x option to not run a set of fixers. -- Regards, Benjamin
Yes, you can easily specify the set of fixers to use with a
command-line flag. Each specific transform (e.g. "except a, b" ->
"except a as b") can be turned on or off that way.
2009/3/27
Following up on yesterday's conversation about 2to3 and 3to2, I wonder if it's easily possible to run 2to3 with a specific small subset of its fixers? For example, people not wanting to make the 2->3 leap yet might still be interersted in the exception handling changes ("except Foo as exc")?
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (4)
-
Benjamin Peterson
-
Collin Winter
-
Guido van Rossum
-
skip@pobox.com