docpicture

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Mon Oct 13 18:20:02 EDT 2008


On Mon, 13 Oct 2008 16:41:58 -0500, skip wrote:

>>> Nothing.  It's just a doc string containing a bunch of hex codes.  Doc
>>> strings are ignored by the interpreter (AIUI).
> 
>     Benjamin> I mean what happens when you type help() into the
>     interactive Benjamin> console on the command line? You will see the
>     docstrings, and Benjamin> there will be a whole bunch of random hex
>     characters there.
> 
> If an IDE can be trained to recognize and display such a picture I sorta
> assume help() can be trained to recognize and ignore it.

And if not, it's no big deal. Your help string has a clearly labeled few 
lines of hex:

Help on function spam:

spam(...)
    spam spam spam spam spam spam 
    spam spam spam spam with a fried egg on top

    === begin docpicture ===
    1234567890ABCDEF
    1234567890ABCDEF
    1234567890ABCDEF
    1234567890ABCDEF
    === end docpicture ===


Or similar. I'm sure people will cope, especially since it should be 
relatively rare.



-- 
Steven



More information about the Python-list mailing list