django.utils.encoding.smart_unicode/smart_str handle strings_only inconsistently
|Reported by:||aaugustin||Owned by:||aaugustin|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
smart_unicode calls is_protected_type, smart_str just checks for None and int.
It seems to me that smart_str should rely on is_protected_type too, for consistency.
If there's a reason for implementing a different check, it should be at least explained in a comment.
Change History (4)
comment:3 Changed 3 years ago by aaugustin
- Owner changed from nobody to aaugustin
- Status changed from new to assigned