[SciPy-dev] change print statements to print functions in docstrings

Ralf Gommers ralf.gommers@googlemail....
Sat Aug 15 11:24:48 CDT 2009


On Sat, Aug 15, 2009 at 11:37 AM, Charles R Harris <
charlesr.harris@gmail.com> wrote:

>
>
> On Sat, Aug 15, 2009 at 7:59 AM, Emmanuelle Gouillart <
> emmanuelle.gouillart@normalesup.org> wrote:
>
>>        Hi,
>>
>>        I've started changing the print statements in numpy's doctrings
>> to print functions on the doc wiki, to meet the requirements of Python
>> 3.0. Any objections or comments?
>>
>
> This can lead to some oddities:
>
> In [6]: print(1,2,3)
> (1, 2, 3)
>
>
> I think it might be better to find out what  2to3 does in these
> circumstances first.
>

>From the 2to3 docs:
"2to3 can also refactor doctests. To enable this mode, use the -d
f**<http://docs.python.org/using/cmdline.html#cmdoption-d>lag.
Note that *only* doctests will be refactored. This also doesn’t require the
module to be valid Python. For example, doctest like examples in a reST
document could also be refactored with this option."

Anyway, the change can also be made with a good editor and search-replace. I
am all for changing this, my point was simply that the doc wiki is not the
best tool to make changes like these (not that I don't love the doc wiki,
it's great).

Cheers,
Ralf


> Chuck
>
>
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20090815/3d5abf6c/attachment.html 


More information about the Scipy-dev mailing list