1 Jul 2002 01:06
RE: Matrix class problems
<alan.gauld <at> bt.com>
2002-06-30 23:06:58 GMT
2002-06-30 23:06:58 GMT
> Firstly, I would like to know what exactly repr() does. I read the > docs, and this is what I got : > ... > Return the canonical string representation of the object. > For most object types, eval(repr(object)) == object. > """ > > What does this mean and how is this different from str() ? repr is a pythonic representation of an object as a string. str is a human readable version. You can see the difference at the prompt by typing values with and without the print command: >>> print 5 # uses str() 5 >>> 5 # uses repr() 5 >>> # the above are identical >>> s = "Hello world" >>> print s Hello world >>> s "Hello world" >>> # notice repr added qutes whereas str didn't Coming back to the doc string comment consider what happens with eval:(Continue reading)
>
> The standard programmers game in Tico was to type your name and
> try to guess what the effect would be on your code(*)! The only good
> thing I can say about Tico is that it was so bad it drove
> James Gosling to invent the original Emacs!
I think you mean TECO. Also, Gosling didn't write the first Emacs.
Richard M. Stallman did that, merging two existing TECO macro
packages. Gosling wrote the first implementation of Emacs in C.
Peace,
Kalle
RSS Feed