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


Groups > comp.lang.python > #49506

math functions with non numeric args

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <formisc@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'string': 0.09; '-10': 0.09; 'ascii': 0.09; 'converts': 0.09; 'bye': 0.16; 'subject:non': 0.16; 'with?': 0.16; 'print': 0.22; 'characters': 0.30; 'message- id:@mail.gmail.com': 0.30; 'guess': 0.33; 'subject:with': 0.35; 'received:google.com': 0.35; 'thank': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'more': 0.64; 'dealt': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=J1Trt+V201adLys2hTjE5Yw6atCFAFM1YfLruyZRbI0=; b=Qvx46CkU0dk1gxDpYvwpm7GXKzyJmelefPQouhkRThPuLFCZZxaG1Iwk7K1tkZX78E kYA+pX9FKdSXYLvZdufF43NtnKpmejae9oosGkDuChBa4v64ewzE1ICSrKygzXzQemrF rGlvFoF7e8ddJPrdI5qHCHH9jslnHxE1k/6A11eXsVScc7K9SezljqYy3O6Q6LYzNh5g yTPiaSxWsD4yg3oFbTWUMZNieKMRmnOF2gK6TC+wBsKmoUuVEzrZowbvzex1ztpKtEZb fqNOX3w05GRFs6DZtmxstQaLRcWqdpA+WFqpRd2QLSYXLKYldLBgLYs1wrsYBmlDpEhM xv8g==
X-Received by 10.112.142.66 with SMTP id ru2mr10548828lbb.7.1372618011784; Sun, 30 Jun 2013 11:46:51 -0700 (PDT)
MIME-Version 1.0
From Andrew Z <formisc@gmail.com>
Date Sun, 30 Jun 2013 14:46:11 -0400
Subject math functions with non numeric args
To python-list@python.org
Content-Type multipart/alternative; boundary=001a11c37aaa013dd004e063891e
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4036.1372618018.3114.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1372618018 news.xs4all.nl 15868 [2001:888:2000:d::a6]:53043
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:49506

Show key headers only | 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