Changes between Initial Version and Version 1 of Ticket #24836, comment 7


Ignore:
Timestamp:
05/22/15 18:57:29 (8 years ago)
Author:
Carl Meyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24836, comment 7

    initial v1  
    1717Then `force_text` would actually behave as its docstring claims, and resolve all lazy instances (including `SimpleLazyObject`) to strings.
    1818
    19 We could make the check even stricter and require an exact class match -- `if type(s) is six.text_type` -- but then `force_text` would begin reducing string subclasses to the base string class too. I don't have a clear intuition that it ought to do that, so I think I'd favor the `issubclass` version.
     19We could make the check even stricter and require an exact class match -- `if type(s) is six.text_type` -- but then `force_text` would begin reducing string subclasses to the base string type too. I don't have a clear intuition that it ought to do that, so I think I'd favor the `issubclass` version.
Back to Top