I have learned that Python 3 is not backwards compatible.
Will it not affect a lot of applications using older versions of Python?
How did the developers of Python 3 not think it was absolutely necessary to make it backwards compatible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is Python 3.0 backward-compatible and why?
Python 3.0 implements a lot of very useful features and breaks backward compatibility. It does it on purpose, so the great features can be implemented even despite the fact Python 2.x code may not work correctly under Python 3.x.
So, basically, Python 3.0 is not backward-compatible on purpose. Thanks to that, you can benefit from a whole new set of features. It is even called “Python 3000” or “Python 3K“.
From “What’s new in Python 3.0” (available here):
Python features new in 3.0, breaking backward compatibility
Some of the most notable features that may be considered as breaking backward compatibility, but improving the language at the same time, are:
printis now a function, not a statement, and using it as statement will result in an error,cmpargument for sorting functions likesorted()andlist.sort()is no longer supported, and should be replaced bykeyargument,intis now the same as Python 2.x’slong, which makes number processing less complex,/operator is now an operator for true division by default (you can still use//for floor division),True,FalseandNoneare now reserved words (so you are not able to doTrue, False = False, True,BaseException, must be raised & caught differently than in Python 2.x,