[Epydoc-devel] Displaying unicode string values
Brought to you by:
edloper
From: Edward L. <ed...@gr...> - 2007-02-20 19:54:21
|
Currently, in the HTML output, unicode string values are displayed =20 using a format similar to repr. I.e., if you define a variable: x =3D u'D=E9faut' then its value will be rendered in the output docs as: u'D\xe9faut' Similarly for parameter default values. But there's been a request =20 to change this to display the string literal using unicode [1]. I'm =20 ambivalent about which way I prefer, so I wanted to see if anyone =20 else had opinions on the matter. Advantages of the current escaped =20 repr (u'D\xe9faut'): - Not all browsers can display all unicode characters; but all =20 browsers can display ascii. E.g., rendering u'D=E9faut' in a text-based =20 browser like links just reduces it to "u'Default'", which is a different =20= Python value. - Certain unicode characters can look very similar to ascii =20 characters or other unicode characters; there's less chance of misunderstanding a value if it's in ascii and unicode chars are escaped. Advantages of the unescaped repr: - Easier to read. Thoughts? -Edward [1] https://sourceforge.net/tracker/index.php?=20 func=3Ddetail&aid=3D1663578&group_id=3D32455&atid=3D405618 |