Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.chainon-marquant.org!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'url:sourceforge': 0.02; 'subject:based': 0.07; 'received:209.85.160.174': 0.09; 'received :mail-gy0-f174.google.com': 0.09; 'tuple': 0.09; 'am,': 0.12; 'def': 0.13; '16,': 0.15; '[1].': 0.16; 'contexts,': 0.16; 'definite': 0.16; 'fellow,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'integers.': 0.16; 'myclass': 0.16; 'self,': 0.16; 'subject: \n ': 0.16; 'subject:syntax': 0.16; 'unambiguous': 0.16; '\xa0def': 0.16; 'wrote:': 0.18; 'dec': 0.22; 'header:In-Reply-To:1': 0.22; 'message-id:@mail.gmail.com': 0.28; 'class': 0.29; 'generally': 0.30; 'vast': 0.30; 'received:209.85.160': 0.33; 'fri,': 0.34; 'to:addr:python-list': 0.34; 'too': 0.34; 'subject:/': 0.35; 'be.': 0.35; 'however,': 0.36; 'two': 0.37; 'received:google.com': 0.37; 'think': 0.37; 'steven': 0.38; 'some': 0.38; 'received:209.85': 0.38; 'should': 0.39; 'received:209': 0.40; 'to:addr:python.org': 0.40; 'difference': 0.40; 'url:net': 0.60; '2011': 0.61; 'town': 0.63; 'results': 0.63; 'day,': 0.64; 'proud': 0.70; '12:12': 0.84; 'adopt': 0.84; 'pony': 0.84; 'purse': 0.84; 'sum': 0.89 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:content-transfer-encoding; bh=trYxTiZ8bdWaQXhbgEnhaZfXx4zExvGqKC27alrcd6g=; b=MMHgDW9kHVpGWVzLC4GfBRhv+KK47fV0adzBOw7nhvvl/pjIatUspsn8O2K6ODraQd ipQam3eSOD/uMNnPvNvE/U52DgjI2BAofCm4tgX+lpU9D5kSVJINbqc3//xCzBuK8djV gwyuoSlpertGEfUcxbuHt6viWm7TrTLpALBDA= MIME-Version: 1.0 In-Reply-To: <4ef32cd9$0$29973$c3e8da3$5496439d@news.astraweb.com> References: <841f4d29-f50b-4b0b-912b-b497fb6e60ec@t16g2000vba.googlegroups.com> <4ef32cd9$0$29973$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 23 Dec 2011 00:30:56 +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 Content-Transfer-Encoding: quoted-printable 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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1324560659 news.xs4all.nl 6909 [2001:888:2000:d::a6]:59245 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17732 On Fri, Dec 23, 2011 at 12:12 AM, Steven D'Aprano wrote: > class MyClass superclasslist A, B C: > =A0 =A0def method argumentlist self, x, y: > =A0 =A0 =A0 =A0t =3D tuple 1, 2 tuple 3, 4 endtuple endtuple > =A0 =A0 =A0 =A0return group x + y endgroup * group x - y endgroup > > > Much less confusing! A definite improvement. However, I fear that the numerals "1", "2", etc are far too vague. In some contexts, the abuttal of two such numerals results in a larger number by a factor of 10, while in others, the factor is 8, or 16, or 2. This must not be. We need an unambiguous representation of integers. Also, I think we should adopt an existing standard [1]. This is generally a good idea. class MyClass superclasslist A, B C: def method argumentlist self, x, y: t =3D tuple summer's day, proud pony tuple sum of honest purse and fellow, large proud town endtuple endtuple return product of group sum of x and y endgroup and group difference between x and y endgroup You will find this a vast improvement. ChrisA [1] http://shakespearelang.sourceforge.net/report/shakespeare/shakespeare.h= tml#SECTION00045000000000000000 or http://tinyurl.com/6sycv