#18063: repr() should return only ascii, not unicode
-------------------------------------+-------------------------------------
     Reporter:  guettli              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  reopened
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by guettli):

 * status:  closed => reopened
 * resolution:  needsinfo =>


Comment:

 The Python documentation says about repr:

 {{{
 ... so it is important that the representation is information-rich and
 unambiguous
 }}}

 It should be **unambiguous**. For me a utf8 byte string is ambiguous. It
 could by a pure binary string, or it could be an other encoding like
 latin1. You get strange UnicodeErrors if you pass around utf8 byte strings
 in Python 2.x. It is hard to get to the root of the problem, especially if
 you are new to python.

 I understand Karen that she is worried about [<Cat: Skittle (now Am?lie)>]
 looking strange and broken. But this output is much better than a unicode
 exception without any usable output.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18063#comment:13>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to