Changes between Version 66 and Version 67 of DeveloperGuidelines/Py_2_3


Ignore:
Timestamp:
07/07/19 12:03:47 (6 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Py_2_3

    v66 v67  
    266266=== Cannot use LazyT as sorting key ===
    267267
    268 This may be a temporary issue - web2py's {{{LazyT}}} does not define a {{{__lt__}}} method which is used for sorting in Python-3, but it does define a {{{__cmp__}}} which is used by Python-2.7 and therefore works.
    269 
    270 For the same reason, sorting an array of {{{lazyT}}} does not work in Python-3.
     268This may be a temporary issue:
     269Web2py's {{{LazyT}}} does not define a {{{__lt__}}} method which is used for sorting in Python-3, but it does define a {{{__cmp__}}} which is used by Python-2.7 and therefore works. For the same reason, sorting an array of {{{lazyT}}} does not work in Python-3.
    271270
    272271As a workaround, wrap the {{{lazyT}}} in {{{s3_str}}} when sorting or using it as sorting key.