Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news-transit.tcx.org.uk!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.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; 'int': 0.05; 'operator': 0.05; 'string,': 0.05; 'difference,': 0.09; 'oh,': 0.09; 'subject:tutorial': 0.09; 'tuple': 0.09; 'am,': 0.14; 'wrote:': 0.14; '"1"': 0.16; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'message- id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'significance': 0.16; 'obviously': 0.20; 'cc:no real name:2**0': 0.20; 'maybe': 0.21; 'header:In-Reply-To:1': 0.22; 'cc:addr :python-list': 0.22; 'converted': 0.23; "didn't": 0.25; 'object': 0.27; 'string': 0.29; '(as': 0.29; 'list': 0.30; 'cc:addr:python.org': 0.31; 'reference': 0.34; 'received:70': 0.34; 'header:User-Agent:1': 0.35; 'explicit': 0.35; 'should': 0.37; 'used': 0.38; 'cc:2**1': 0.38; 'place,': 0.39; 'returning': 0.39; 'add': 0.39; "it's": 0.40; 'cast': 0.60; 'addition': 0.62; 'subject:online': 0.77; '11:51': 0.84; 'much)': 0.84 Date: Sat, 23 Apr 2011 12:25:24 -0500 From: Tim Chase User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Dotan Cohen Subject: Re: learnpython.org - an online interactive Python tutorial X-Priority: 5 (Lowest) References: <506eb5e4-4f29-473a-8d47-2082322e005e@glegroupsg2000goo.googlegroups.com> <201104211710.19587.akabaila@pcug.org.au> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Source: X-Source-Args: X-Source-Dir: Cc: python-list@python.org, harrismh777 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: 39 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303579542 news.xs4all.nl 41110 [::ffff:82.94.164.166]:50486 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3916 On 04/23/2011 11:51 AM, Dotan Cohen wrote: > harrismh777 wrote: >> If an operation like (+) is used to add 1 + '1' then the >> string should be converted to int and the addition should >> take place, returning a reference to object int (2). > > No, the int 1 should be cast to a string, and the result > should be the string '11'. Oh, come on...clearly if you're adding mixed types, there's significance to the difference, so the result should obviously be the complex number (1+1j) Or maybe it should be the tuple (1,1) Or did I mean the list [1,1] It's all so obvious... :) I didn't mind the auto-promotion (as much) in VB6 when I had an explicit concat operator 1 & "1" ' returns "11" vs 1 + "1" ' returns 2 -tkc