On Sun, Jun 30, 2013 at 12:46 PM, Andrew Z <form...@gmail.com> wrote:
> 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?

No, it leaves the types as they are but simply considers strings to be
"greater than" numbers.  As another poster stated, this is fixed in
Python 3, where strings and numbers are considered inorderable.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to