Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.04; 'string.': 0.04; 'operator,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subject:tutorial': 0.09; '"a"': 0.16; '"b"': 0.16; 'bieber': 0.16; 'declaimed': 0.16; 'email addr:ix.netcom.com': 0.16; 'email name:wlfraed': 0.16; 'from:addr:ix.netcom.com': 0.16; 'from:addr:wlfraed': 0.16; 'from:name:dennis lee bieber': 0.16; 'okay,': 0.16; 'received:66.245': 0.16; 'received:dsl.mindspring.com': 0.16; 'received:mindspring.com': 0.16; 'received:wlfraed': 0.16; 'url:netcom': 0.16; 'url:wlfraed': 0.16; 'us."': 0.16; 'wulfraed': 0.16; '(or': 0.22; 'lee': 0.22; 'integer': 0.23; 'numbers.': 0.23; 'url:home': 0.25; "i'm": 0.26; 'chris': 0.27; 'string': 0.29; 'fri,': 0.29; 'probably': 0.30; 'strings,': 0.31; 'however,': 0.31; 'to:addr:python-list': 0.32; 'done': 0.32; 'header:X -Complaints-To:1': 0.34; 'print': 0.35; 'charset:us-ascii': 0.36; 'should': 0.37; 'apr': 0.38; 'strings': 0.38; 'but': 0.38; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'header:Mime- Version:1': 0.39; 'add': 0.39; 'header:Received:5': 0.40; '2011': 0.62; 'credit': 0.67; 'dennis': 0.68; 'subject:online': 0.77; 'promote': 0.78; 'concatenate': 0.84; 'dollars': 0.87 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: learnpython.org - an online interactive Python tutorial Date: Fri, 22 Apr 2011 23:28:28 -0700 Organization: > Bestiaria Support Staff < References: <506eb5e4-4f29-473a-8d47-2082322e005e@glegroupsg2000goo.googlegroups.com> <201104211710.19587.akabaila@pcug.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: user-11fabbn.dsl.mindspring.com X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303540124 news.xs4all.nl 41117 [::ffff:82.94.164.166]:54663 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3904 On Fri, 22 Apr 2011 17:08:53 +1000, Chris Angelico declaimed the following in gmane.comp.python.general: > I'm not so sure that all strings should autopromote to integer (or > "numeric" generally). However, adding a string and a number _should_ > (IMHO) promote the number to string. > > print "Hello, "+name+", you have "+credit+" dollars of credit with us." > > Okay, that one is probably better done with the % operator, but it > definitely makes logical sense to concatenate numbers and strings as > strings, not to add them as numbers. > But what if /I/ want "A" + 1 to return "B" -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/