Message77015
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] |
|
Date |
User |
Action |
Args |
2008-12-05 13:24:01 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, ekorn |
2008-12-05 13:24:01 | amaury.forgeotdarc | set | messageid: <1228483441.51.0.674583022322.issue4545@psf.upfronthosting.co.za> |
2008-12-05 13:22:48 | amaury.forgeotdarc | link | issue4545 messages |
2008-12-05 13:22:47 | amaury.forgeotdarc | create | |
|