(Oct-20-2016, 02:04 AM)Skaperen Wrote: it's a simple answer. too simple. too simple for 2to3 to do it?Is there really a problem here at all
python 2.x
#greet.py def greet(name): return("Hello, {}!".format(name)) name = raw_input("What's your name? ") print 'Hello {}'.format(greet(name)) print('Hello {}'.format(greet(name)))I run python 2to3.py -w greet.py
#greet.py def greet(name): return("Hello, {}!".format(name)) name = input("What's your name? ") print('Hello {}'.format(greet(name))) print('Hello {}'.format(greet(name)))It only convert the python 2.x print statement to python 3.x print function,
and do not touch python 3.x print function.