Changes between Version 75 and Version 76 of DeveloperGuidelines/Py_2_3


Ignore:
Timestamp:
07/10/19 22:35:28 (5 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Py_2_3

    v75 v76  
    324324Python-2 did not implement the U0307 character, so it converted the letters like this:
    325325{{{#!python
     326# Actually wrong in both cases, but consistently so:
    326327>>> u"İ".lower().upper()
    327328u'I'
     
    334335}}}
    335336
    336 Python-3 does implement the U0307 character, so the behavior is different:
     337Python-3, where all str are unicode, does implement the U0307 character, so the behavior is different:
    337338{{{#!python
    338339>>> "İ".lower().upper()
    339340'İ'
     341# But: same inconsistency as Py2 with the dot-less lowercase ı
    340342>>> "ı".upper().lower()
    341343'i'
     
    354356
    355357This is just something to keep in mind - an actual forward/backward compatibility pattern must be developed for the specific use-case. Neither the Python-2 nor the Python-3 are particularly helpful for generalization, the Turkish I's always need special treatment.
     358
     359NB ECMA-Script implements the same behavior as Python-3, so there is cross-platform consistency, at least.