Changes between Version 37 and Version 38 of DeveloperGuidelines/Py_2_3


Ignore:
Timestamp:
07/02/19 12:36:30 (5 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Py_2_3

    v37 v38  
    112112||!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)||
    113113||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)||
    114115||urlparse||module||{{{from s3compat import urlparse}}}||maps to urllib.parse in Py3||
    115116||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)||