2 ms·
It is. You see, Python 2.8 cannot be compatible with 2 and 3 because some changes are mutually exclusive: - you need to choose either bytes or str, you can't h
by sametmax 10y ago
It is. You see, Python 2.8 cannot be compatible with 2 and 3 because some changes are mutually exclusive:
- you need to choose either bytes or str, you can't have both. And Python 2 API have many functions accepting and returning bytes while Python 3 have many ones with unicode.
- the C ABI and the byte code changed.
- built-in changed.
So you will have to choose between one behavior or the other and deal with it. This is what you do with the excellent six or Python-future libs. They let you write 2/3 compatible code, but the first thing they do is making you choose either the 2 or the 3 behavior.