Python can't divide??!?!

Kurt B. Kaiser kbk at
Sat Feb 7 18:42:18 CET 2004

John Hunter <jdhunter at> writes:

> The thing that may be tripping you up is that (val) is simply the
> value, and (val,) is a tuple containing the value as the first
> element.  As for printing a value versus a tuple of values, that's the
> __repr__ versus __str__ distinction previous posters have referred to.


Tim enlightened me on this issue some years ago, when I suggested a
"solution" using sys.displayhook;

Just try explaining this stuff to a 9 year old learning Python!  It
tends to break the expository flow....


"Don't sit there with your face all screwed up. Swallow!
 Cod liver oil is good for you"

More information about the Python-list mailing list