Changes between Version 2 and Version 3 of DeveloperGuidelines/Py_2_3


Ignore:
Timestamp:
06/26/19 09:05:40 (6 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Py_2_3

    v2 v3  
    7878from s3 import s3_format_datetime # outside modules/s3
    7979}}}
     80
     81=== Alternative Imports ===
     82
     83As the locations and names of some libraries have changed in Python-3, we use the compatibility module (modules/s3compat.py) to implement suitable alternatives. Similarily, the compat module provides alternatives for other objects such as types, functions and certain common patterns.
     84
     85Where an object name is provided by modules/s3compat.py, it must be imported from there if used.
     86
     87The following objects are provided by s3compat:
     88
     89||= '''Name''' =||= '''Import''' =||= '''!Comments/Caveats''' =||
     90||StringIO||{{{from s3compat import StringIO}}}||||