[Python-Dev] Adding examples to PEP 263
Steve Holden
steve at holdenweb.com
Fri Nov 4 13:03:44 CET 2005
M.-A. Lemburg wrote:
> Fredrik Lundh wrote:
>
>>the runtime warning you get when you use non-ascii characters in
>>python source code points the poor user to this page:
>>
>> http://www.python.org/peps/pep-0263.html
>>
>>which tells the user to add a
>>
>> # -*- coding: <encoding name> -*-
>>
>>to the source, and then provides a more detailed syntax description
>>as a RE pattern. to help people that didn't grow up with emacs, and
>>don't speak fluent RE, and/or prefer to skim documentation, it would
>>be a quite helpful if the page also contained a few examples; e.g.
>>
>># -*- coding: utf-8 -*-
>># -*- coding: iso-8859-1 -*-
>>
>>can anyone with SVN write access perhaps add this?
>
>
> Good point. I'll add some examples.
>
>
>>(I'd probably add a note to the top of the page for anyone who arrives
>>there via a Python error message, which summarizes the pep and provides
>>an example or two; abstracts and rationales are nice, but if you're just a
>>plain user, a "do this; here's how it works; further discussion below" style
>>is a bit more practical...)
>
>
> The PEP isn't all that long, so I don't think a summary would
> help. However, we might want to point the user to a different
> URL in the error message, e.g. a Wiki page with more user-friendly
> content.
>
Under NO circumstances should a Wiki page be used as the destination for
a link in a runtime error message.
If the page happens to be spammed when the user follows the link they'll
wonder why the error message is pointing to a page full of links to hot
babes, or whatever.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-Dev
mailing list