Python can't divide??!?!
Axle
sheepsquall at netscape.net
Sat Feb 7 20:14:25 EST 2004
Yes, python can divide... use the / operator
Kurt B. Kaiser wrote:
> John Hunter <jdhunter at ace.bsd.uchicago.edu> 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;
>
> http://www.google.com/groups?q=g:thl2117804141d&dq=&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=mailman.991854611.2080.python-list%40python.org
>
> Just try explaining this stuff to a 9 year old learning Python! It
> tends to break the expository flow....
>
More information about the Python-list
mailing list