Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'operator': 0.04; 'subject:based': 0.07; 'python': 0.08; 'false,': 0.09; 'noted,': 0.09; 'received:209.85.210.174': 0.13; 'received:mail- iy0-f174.google.com': 0.13; '"1"': 0.16; 'driscoll': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'haskell,': 0.16; 'list!': 0.16; 'multiplies': 0.16; 'subject: \n ': 0.16; 'subject:syntax': 0.16; 'language': 0.17; 'wrote:': 0.18; 'convert': 0.19; 'java,': 0.19; 'dec': 0.22; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'somewhere': 0.23; 'message- id:@mail.gmail.com': 0.28; 'sorry,': 0.29; 'pm,': 0.29; 'keeps': 0.30; 'allowed,': 0.30; 'arithmetic': 0.30; 'false.': 0.30; 'sun,': 0.30; 'does': 0.32; 'list': 0.32; 'error.': 0.32; 'to:addr :python-list': 0.34; 'things': 0.34; 'curious': 0.34; 'integer': 0.34; 'sense,': 0.34; 'something': 0.35; 'subject:/': 0.35; 'url:python': 0.36; 'however,': 0.36; 'archives:': 0.37; 'url:pipermail': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'allows': 0.38; 'some': 0.38; 'received:209.85': 0.38; 'put': 0.38; "i'd": 0.39; 'url:org': 0.39; 'should': 0.39; 'being': 0.39; 'strong': 0.39; "it's": 0.40; 'received:209': 0.40; 'to:addr:python.org': 0.40; '2011': 0.61; 'double': 0.61; 'account': 0.66; 'automatic': 0.72; '[1,2]': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=g5+4PfhVhijEjSwsV42c1aVbt+GJnlezvHofl2Nbn1c=; b=XIuzGxeYjN2fGdWuD8BepS7GUTQJw4XmzaAXfK/ZRu9lBQ+tVEDv4Fqf8uJT8gpRyL 7bkbhmJhrFvWafVVTxK73qMqs5HOoAOMcjGIAl40xErLYLCbLajGgQCCMydHBGXY1lo6 g43So3V1mOYBWQiPAm+lFAOTfmkczy6CQ56Cw= MIME-Version: 1.0 In-Reply-To: <4EED57E5.2020900@wisc.edu> References: <841f4d29-f50b-4b0b-912b-b497fb6e60ec@t16g2000vba.googlegroups.com> <4eed3b00$0$29979$c3e8da3$5496439d@news.astraweb.com> <4EED57E5.2020900@wisc.edu> Date: Sun, 18 Dec 2011 14:42:05 +1100 Subject: Re: Pythonification of the asterisk-based collection packing/unpacking syntax From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 2001:888:2000:d::a6 X-Trace: 1324179728 news.xs4all.nl 6860 [2001:888:2000:d::a6]:50279 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17429 On Sun, Dec 18, 2011 at 2:03 PM, Evan Driscoll wrote: > Sorry, I just subscribed to the list so am stepping in mid-conversation, Welcome to the list! If you're curious as to what's happened, check the archives: http://mail.python.org/pipermail/python-list/ > Something like ML or Haskell, which does not even allow integer to > double promotions, is very strong typing. Something like Java, which > allows some arithmetic conversion and also automatic stringification (a > la "1" + 1) is somewhere in the middle of the spectrum. Personally I'd > put Python even weaker on account of things such as '[1,2]*2' and '1 < > True' being allowed, but on the other hand it doesn't allow "1"+1. But [1,2]*2 is operator overloading. The language doesn't quietly convert [1,2] into a number and multiply that by 2, it keeps it as a list and multiplies the list by 2. Allowing 1 < True is weaker typing. It should be noted, however, that "1 < True" is False, and "1 > True" is also False. The comparison doesn't make much sense, but it's not an error. ChrisA