You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-01-12.22:24:33.403>created_at=<Date2020-01-12.15:15:27.401>labels= ['expert-2to3', '3.9']
title='lib2to3 provide a way to use exec as a function in RefactoringTool'updated_at=<Date2020-01-12.22:24:33.402>user='https://github.com/isidentical'
bpo-23896 introduced a grammar without print and exec statements (they both are functions now) but both the lib2to3 cli script and RefactoringTool lacks of that functionality (which is pretty useful for outside users of lib2to3 like formatters)
(RefactoringTool)
if self.options["print_function"]:
self.grammar = pygram.python_grammar_no_print_statement
else:
self.grammar = pygram.python_grammar
It should be supported here and on the command line script.
After discussing with @pablogsal, instead of offering 2 options that one overlaps another we added -e option to 2to3.main and exec_function option (alongside print_funtion) to RefactoringTool.
isidentical
changed the title
lib2to3 RefactoringTool python_grammar_no_print_and_exec_statement
lib2to3 provide a way to use exec as a function in RefactoringTool
Jan 12, 2020
New changeset 61b1415 by Miss Islington (bot) (Batuhan Taşkaya) in branch 'master': bpo-39313: Add an option to RefactoringTool for using exec as a function (GH-17967) 61b1415
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: