Changes between Version 38 and Version 39 of DeveloperGuidelines/Py_2_3
- Timestamp:
- 07/02/19 12:36:49 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Py_2_3
v38 v39 112 112 ||!ClassType||type||{{{from s3compat import ClassType}}}||replaces {{{types.ClassType}}} (old-style classes) in Py2, maps to {{{type}}} in Py3 (old-style classes do no longer exist)|| 113 113 ||CLASS_TYPES||tuple||{{{from s3compat import CLASS_TYPES}}}||maps to tuple of all known class types: {{{(type,types.ClassType)}}} in Py2, just (types,) in Py3, for use with {{{isinstance}}}|| 114 ||xrange||function||{{{from s3compat import xrange ||maps to {{{range}}} in Py3, since {{{xrange}}} does no longer exist (but {{{range}}} behaves like it)||114 ||xrange||function||{{{from s3compat import xrange}}}||maps to {{{range}}} in Py3, since {{{xrange}}} does no longer exist (but {{{range}}} behaves like it)|| 115 115 ||urlparse||module||{{{from s3compat import urlparse}}}||maps to urllib.parse in Py3|| 116 116 ||urllib2||module||{{{from s3compat import urllib2}}}||maps to urllib.requests in Py3, which contains only part of Py2's urllib2 - some urllib2 objects therefore need to be imported separately (see below)||