Changes between Version 71 and Version 72 of DeveloperGuidelines/Py_2_3


Ignore:
Timestamp:
07/09/19 13:06:09 (5 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Py_2_3

    v71 v72  
    285285a.sort(key=lambda item: s3_str(item))
    286286}}}
     287
     288=== XML with XML declaration must be bytes ===
     289
     290Any XML that contains an XML declaration must be UTF-8 encoded {{{bytes}}}. In Python-2, {{{bytes}}} is synonymous with {{{str}}} - but in Python-3 it is a different data type.
     291
     292- {{{S3XML.tostring}}} and {{{S3Resource.export_xml}}} will always return {{{bytes}}}
     293- if string operations must be performed on such XML, use {{{s3_str}}} to convert it
     294
     295=== BytesIO ===
     296
     297Certain libraries expect a file-like object to represent binary data. Whilst in Python-2, this can be handled with {{{StringIO}}}, Python-3 requires to use {{{BytesIO}}} instead.
     298
     299- {{{zipfile}}} expects and returns {{{bytes}}}