This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, ekorn
Date 2008-12-05.13:22:47
SpamBayes Score 1.7240025e-07
Marked as misclassified No
Message-id <1228483441.51.0.674583022322.issue4545@psf.upfronthosting.co.za>
In-reply-to
Content
Doctest output scrupulously follows the output of an interactive session
of python.

On my machine:

Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.array2string(numpy.arange(2))
'[0 1]'
>>>

The the interactive session does not simply print objects, it calls
repr() on them, so that you can make the distinction between the number
0 and the string "0".

You should add quotes to your doctest string, or use print:

>>> import numpy
>>> print numpy.array2string(numpy.arange(2))
[0 1]
History
Date User Action Args
2008-12-05 13:24:01amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, ekorn
2008-12-05 13:24:01amaury.forgeotdarcsetmessageid: <1228483441.51.0.674583022322.issue4545@psf.upfronthosting.co.za>
2008-12-05 13:22:48amaury.forgeotdarclinkissue4545 messages
2008-12-05 13:22:47amaury.forgeotdarccreate