Marc-Andre Lemburg <m...@egenix.com> added the comment:

Ezio Melotti wrote:
> 
> Ezio Melotti <ezio.melo...@gmail.com> added the comment:
> 
> One reason is that unicodedata.lookup actually returns a unicode char, so if 
> we want to show a code snippet that uses unicodedata.lookup we either have to 
> use a unicode literal or limit the chars in the examples to latin1 to make 
> sure it works nice with the PDF generator.

Why not wrap the calls with a repr() ?

> Using escape sequences elsewhere might work, but in some examples it's better 
> to use the actual chars IMHO (except that they don't work with the PDF).

Sure, it'll look nicer, but it will also make comparing the examples
with the actual output users see on the screen error-prone (e.g. if
the fonts don't have the necessary glyphs).

Copy&paste will also often fail.

I think it's more useful to show examples that more or less always
work, than ones which display all available goodies.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10665>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to