Changes between Version 38 and Version 39 of Python3


Ignore:
Timestamp:
2020-10-15T13:45:15Z (4 years ago)
Author:
itamarst
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Python3

    v38 v39  
    144144
    145145Leaking Future objects (newints, new dicts, new bytes) in module API can break existing code on Python 2. So need to be careful not to do that. For that reason int isn't in the suggested `from builtins import ...` list above.
     146
     147== Dealing with utility modules ==
     148
     149Often you will have some utility module with lots of random code, some of which doesn't work on Python 3, or which even involves imports of non-Python-3-compatbile code (Nevow, in this case).
     150
     151Options:
     152
     1531. Create new `util_py3.py` module, move just the things you need, have `util.py` import code from there.
     1542. Add conditional imports/declarations to `util.py` so it imports on Python 3 and at least some of the code can be made to work.
     155
     156Originally we went with first approach, but plausibly second approach is better.