[Python-Dev] Python 3 as a Default in Linux Distros (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Jul 25 01:04:33 CEST 2013


Chris Angelico wrote:

print "Hello, world!" SyntaxError: invalid syntax Is it safe to presume that it's more likely a syntax error will come from an interpreter version mismatch than a code bug?

Maybe look at sys.args[0], and if it ends in "python" with no version number, add something to the error message about possibly using the wrong version?

-- Greg



More information about the Python-Dev mailing list