2to3 refactoring - Code Review (original) (raw)

Created:
16 years, 8 months ago by Benjamin

Modified:
15 years, 9 months ago

Base URL:
http://svn.python.org/view/\*checkout\*/sandbox/trunk/2to3/

Visibility:
Public.

Description

Moves cmdline processing logic out of RefactoringTool and into its own module lib2to3.main. See issue #3637.

Patch Set 1#

Patch Set 2 : take Greg's advice (thanks!)#

Messages

Total messages: 3

| Benjamin | | 16 years, 8 months ago (2008-08-21 20:44:46 UTC)#1 | | ------------ | | ----------------------------------------------------------- |

gregory.p.smith http://codereview.appspot.com/3247/diff/1/3 File lib2to3/tests/support.py (right): http://codereview.appspot.com/3247/diff/1/3#newcode42 Line 42: def get_refactorer(fixers=None, options={}): using {} as a default ... 16 years, 8 months ago (2008-09-02 05:46:23 UTC)#2

http://codereview.appspot.com/3247/diff/1/3 File lib2to3/tests/support.py (right):

http://codereview.appspot.com/3247/diff/1/3#newcode42 Line 42: def get_refactorer(fixers=None, options={}): using {} as a default arg is dangerous. in this case you just pass it to RefactoringTool which as its currently written copies things out of it rather than keeping a reference and modifying it. But that could change. Please change the default to None and add a docstring mentioning that it should be a dictionary.

Sign in to reply to this message.

Benjamin take Greg's advice (thanks!) 16 years, 8 months ago (2008-09-02 22:19:46 UTC)#3

take Greg's advice (thanks!)

Sign in to reply to this message.