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


Ignore:
Timestamp:
May 22, 2015, 1:57:29 PM (9 years ago)
Author:
Carl Meyer

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