Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'question:': 0.07; 'python': 0.08; 'be:': 0.09; 'readable': 0.09; 'tuple': 0.09; 'bad;': 0.16; 'definition;': 0.16; 'quote.': 0.16; 'subject:syntax': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'appears': 0.19; 'cc:no real name:2**0': 0.20; 'header:In- Reply-To:1': 0.22; 'somehow': 0.23; 'cc:2**0': 0.24; 'helpful': 0.26; 'function': 0.27; 'code,': 0.27; 'somebody': 0.28; 'not.': 0.28; 'lists': 0.28; 'message-id:@mail.gmail.com': 0.28; '(even': 0.29; 'yield': 0.29; 'cc:addr:python.org': 0.29; 'construct': 0.30; 'plus,': 0.30; 'quite': 0.32; 'rule': 0.34; 'list.': 0.35; 'unless': 0.35; 'received:209.85.161': 0.36; 'received:google.com': 0.37; 'using': 0.38; 'some': 0.38; 'received:209.85': 0.38; 'should': 0.39; 'received:209': 0.40; 'more': 0.61; 'type': 0.61; '2011': 0.61; 'your': 0.61; 'code;': 0.84; 'constraint': 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 :cc:content-type; bh=onKKmEBMguD58WFIGcG+x7Uy4PWuoXXuVeqiaVI3TxM=; b=Io7yh9yq/z83LE4f6O589QWkz+masDs/3NcYkpYmLAXxk/dhd1sStfv5axdDpLYbyW HaTZRkACpZUWU317tQ26pyDTKLMb1odv2QeVo4gw0mXkTnw0FNA/qH5Z3zWIaUquXTpY PkzWv5E0lQymloWa6T9ITA6BB/WMb+k8TUx8A= MIME-Version: 1.0 In-Reply-To: References: <4ee554a3$0$11091$c3e8da3@news.astraweb.com> <5de94e20-314e-4185-ba8f-75e54f87968e@d10g2000vbk.googlegroups.com> <4ee6bbb3$0$11091$c3e8da3@news.astraweb.com> <5634cbdc-51dc-450b-aa74-2172173fac2d@y12g2000vba.googlegroups.com> Date: Tue, 13 Dec 2011 10:15:33 +0000 Subject: Re: Verbose and flexible args and kwargs syntax From: Arnaud Delobelle To: Eelco Content-Type: text/plain; charset=UTF-8 Cc: python-list@python.org 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323771336 news.xs4all.nl 6894 [2001:888:2000:d::a6]:51925 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17117 On 13 December 2011 09:50, Eelco wrote: >> To answer that question: for the same reasons. The conversion is >> wasteful; allowing python to do the right thing based on a >> typeconstraint is not. Plus, it is less code, and more readable code; >> the only rule you have to learn is quite general, which is that :: is >> a type constraint annotation; no need to remember specifics, like >> 'unpacking always returns lists for some arbitrary reason'. > > Oh my bad; actually, that should be: > > 'collecting the remainder of an unpacked iterable using * will always > yield a list. That is, unless the construct appears inside a function > definition; then somehow a tuple is always the right choice' When you quote somebody (even yourself), it would be helpful if you attributed your quote. -- Arnaud