Changes between Version 22 and Version 23 of DeveloperGuidelines/Py_2_3


Ignore:
Timestamp:
06/28/19 08:12:21 (5 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Py_2_3

    v22 v23  
    103103||StringIO||{{{from s3compat import StringIO}}}|| ||
    104104||basestring||{{{from s3compat import basestring}}}|| ||
    105 ||INTEGER_TYPES||{{{from s3compat import INTEGER_TYPES}}}||maps to tuple of all known integer types: (int,long) in Py2, (int,) in Py3), for use with {{{isinstance}}}||
     105||unichr||{{{from s3compat import unichr|| ||
     106||STRING_TYPES||{{{from s3compat import STRING_TYPES}}}||maps to tuple of all known string types: (str,unicode) in Py2, (str,) in Py3, for type checking||
     107||long||{{{from s3compat import long}}}||same as {{{int}}} in Py3, so can occasionally lead to redundancy||
     108||INTEGER_TYPES||{{{from s3compat import INTEGER_TYPES}}}||maps to tuple of all known integer types: (int,long) in Py2, (int,) in Py3, for use with {{{isinstance}}}||
    106109||urllib2||{{{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)||
    107110||HTTPError||{{{from s3compat import HTTPError}}}||replaces urllib2.HTTPError in Py2||