[PYTHON MATRIX-SIG] Win95 NumPy 1.0b1 (printing arrays)

Perry A. Stoll pas@xis.xerox.com
Wed, 26 Feb 1997 11:33:56 PST


On 26 Feb, Jim Hugunin wrote:

> [accurate description of repr/str snipped]

> Your problem is that PythonWin has been written so that when you just type 
> "a" and return, you get "repr(a)" rather than "str(a)".  This doesn't 
> really bother me much personally, but if you want to fix it you should 
> either look at the PythonWin source code, or send mail to the pythonwin-sig 
> asking for help.

I don't think it's only PythonWin! On SunOS I get:

jade{pas}<exp1/train> python
Python 1.4 (Jan 22 1997)  [GCC 2.7.0]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> class foo:
...     def __repr__(self): return 'repr called'
...     def __str__(self): return 'str called'
... 
>>> f = foo()
>>> f
repr called
>>> print f
str called
>>> 


-Perry



_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________