[Numpy-discussion] whitespace error in automatic generation of Numpy_Example_List_With_Doc/script

josef pumuckl josef.pktd@gmail....
Sun Mar 30 19:17:49 CDT 2008


Hi,

I was trying to automatically doctest some of the examples in
Numpy_Example_List_With_Doc and obtained a large number of whitespace
errors. The tests, that I tried, passed after turning of whitespace checking
in doctest.

Later I saw that the original numpy example list has leading whitespace
that, I think, gets removed by the script that generates the With_Doc  page.

I think on line 179 a right strip should be used instead of a strip(), so
that any leading white space is kept:
change `` line = line.strip()``  to ``line = line.rstrip()``

the new lines read:

    for i, line in enumerate(input_data):
        # look for optional anchor name
        line = line.rstrip()
        match = re_anchor.match(line)

Looking briefly at the newly generated output, everything still seems to be
correctly generated, but I haven't verified if everything is really correct.

Josef

PS: This is my second attempt to send to the mailing list; I guess my first
message got spam filtered
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080330/c5083bb4/attachment.html 


More information about the Numpy-discussion mailing list