Opened 12 years ago
Closed 11 years ago
#18719 closed Cleanup/optimization (fixed)
django.utils.encoding.smart_unicode/smart_str handle strings_only inconsistently
Reported by: | Aymeric Augustin | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Utilities | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 12 years ago
Component: | Core (Other) → Utilities |
---|
comment:3 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
+1 to use is_protected_type in force_bytes