Changes between Initial Version and Version 1 of Ticket #24836, comment 7
- Timestamp:
- May 22, 2015, 1:57:29 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24836, comment 7
initial v1 17 17 Then `force_text` would actually behave as its docstring claims, and resolve all lazy instances (including `SimpleLazyObject`) to strings. 18 18 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 classtoo. I don't have a clear intuition that it ought to do that, so I think I'd favor the `issubclass` version.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 type too. I don't have a clear intuition that it ought to do that, so I think I'd favor the `issubclass` version.