The standard library contains a rich set of fixers that will handle almost all code. AFAIK, 2to3 expects the input to be *valid* 2.x code that compiles. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number. Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. msg69732 - Author: Barry A. Warsaw (barry) * Date: 2008-07-16 00:01; I think we'll defer this as a blocker. 2to3 handles the old syntax, but a comma after a generator expression was not a valid old syntax. It would be good to get 2to3 working right for the betas, but I don't think it should hold up beta2. 2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. With your patch it accepted this syntax and produced invalid Python program. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. So it seems to me that the bug is in the input, not 2to3, and that this issue should be closed as 'not a bug'. The standard library contains a rich set of fixers that will handle almost all code. The symptom in my case is that, given the following input, the Foo.bar attribute does not show up in the generated HTML, because the reference to print causes the parser to fail with ParseError('bad input'). Once 'done' is entered, print out the largest and smallest of the numbers.
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. So it seems to me that the bug is in the input, not 2to3, and that this issue should be closed as 'not a bug'. > Furthermore, as a test, I copied refactor.py to xxx.py and ran 2to3 on xxx.py It seems to be a bug with 2to3 processing refactor.py. ParseError: Bad input on line 16.
Copyright 2020 2to3 parseerror%3A bad input%3A