Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49506

math functions with non numeric args

From Andrew Z <formisc@gmail.com>
Date 2013-06-30 14:46 -0400
Subject math functions with non numeric args
Newsgroups comp.lang.python
Message-ID <mailman.4036.1372618018.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

math functions with non numeric args Andrew Z <formisc@gmail.com> - 2013-06-30 14:46 -0400
  Re: math functions with non numeric args Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2013-06-30 20:57 +0200

csiph-web