#18719: django.utils.encoding.smart_unicode/smart_str handle strings_only
inconsistently
------------------------------------------------+------------------------
               Reporter:  aaugustin             |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Core (Other)          |        Version:  master
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 `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.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18719>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to