math functions with non numeric args
Andrew Z
formisc at gmail.com
Sun Jun 30 14:46:11 EDT 2013
Hello,
print max(-10, 10)
10
print max('-10', 10)
-10
My guess max converts string to number bye decoding each of the characters
to it's ASCII equivalent?
Where can i read more on exactly how the situations like these are dealt
with?
Thank you
AZ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130630/b6d06ce8/attachment.html>
More information about the Python-list
mailing list