Rick
Rick

Reputation: 7506

What does Python major version incompatible API changes mean?

After reading this quesiton: Python Version Numbering Scheme, I wonder what does "MAJOR version when you make incompatible API changes" mean for Python?

My guess:

  1. CPython incompatible API(function signature) changes ?
  2. The Python language syntax changes ?
  3. CPython incompatible API changes which also leads to the language syntax change ?

Which assumption above is correct?

An example would be much appreciated.

For example, from Python2 to Python3, print 'a' changes to print('a'). This is an incompatible language syntax change. Does it has some incompatiable underlying CPython API change? I don't know.

Upvotes: 0

Views: 197

Answers (1)

diana18
diana18

Reputation: 120

For your particular example, in Python 2 print is a statement and in Python3 it is a function. So you would be right in the way that the API would change to accommodate it as a function

Upvotes: 1

Related Questions