Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!multikabel.net!newsfeed20.multikabel.net!amsnews11.chello.com!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; 'subject:based': 0.07; 'namespace': 0.09; 'notation.': 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; 'am,': 0.12; 'c++': 0.12; '(when': 0.16; 'declaration': 0.16; 'head,': 0.16; 'subject: \n ': 0.16; 'subject:syntax': 0.16; 'uncommon': 0.16; 'unpacking.': 0.16; 'wrote:': 0.18; 'trying': 0.21; 'dec': 0.22; 'header:In-Reply- To:1': 0.22; 'explicit': 0.29; 'looks': 0.29; 'argue': 0.30; 'characters,': 0.30; 'construct': 0.30; 'thu,': 0.32; 'list': 0.32; 'header:User-Agent:1': 0.33; 'header:X-Complaints-To:1': 0.33; 'to:addr:python-list': 0.34; 'subject:/': 0.35; 'similar': 0.36; 'received:au': 0.36; 'sequence': 0.37; 'another': 0.37; 'doing': 0.38; 'signal': 0.38; 'steven': 0.38; 'received:org': 0.38; 'characters': 0.39; 'relatively': 0.39; 'either': 0.39; 'to:addr:python.org': 0.40; 'type': 0.61; '2011': 0.61; 'your': 0.61; 'proposal': 0.66; 'special': 0.68; 'proposal.': 0.91; 'received:110': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Lie Ryan Subject: Re: Pythonification of the asterisk-based collection packing/unpacking syntax Date: Fri, 30 Dec 2011 10:24:57 +1100 References: <841f4d29-f50b-4b0b-912b-b497fb6e60ec@t16g2000vba.googlegroups.com> <55f2aab5-be87-460e-8576-645ac225c63d@l19g2000yqc.googlegroups.com> <272d2d13-3168-4991-84ed-57a255a98c10@p9g2000vbb.googlegroups.com> <99ae9ba0-4488-4b77-8e56-cf5af0d594af@cs7g2000vbb.googlegroups.com> <4ef72180$0$29973$c3e8da3$5496439d@news.astraweb.com> <4efa5072$0$29973$c3e8da3$5496439d@news.astraweb.com> <4efab65f$0$29973$c3e8da3$5496439d@news.astraweb.com> <954ec0e8-327b-45c4-b49e-9c69c2e463c7@j10g2000vbe.googlegroups.com> <4efc69cc$0$29966$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 110-175-240-90.static.tpgi.com.au User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 In-Reply-To: <4efc69cc$0$29966$c3e8da3$5496439d@news.astraweb.com> 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1325201114 news.xs4all.nl 6924 [2001:888:2000:d::a6]:46458 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18195 On 12/30/2011 12:23 AM, Steven D'Aprano wrote: > On Thu, 29 Dec 2011 03:55:14 -0800, Eelco wrote: > >> I would argue that the use of single special characters to signal a >> relatively complex and uncommon construct is exactly what I am trying to >> avoid with this proposal. > > This would be the proposal to change the existing > > head, *tail = sequence > > to your proposed: > > head, tail:: = ::sequence > > (when happy with the default list for tail), or > > head, tail::tuple = ::sequence > > to avoid an explicit call to "tail = tuple(tail)" after the unpacking. > > Either way, with or without an explicit type declaration on the left hand > side, you are increasing the number of punctuation characters from one to > four. If your aim is to minimize the number of punctuation characters, > you're doing it wrong. Another drawback of it is that it looks misleadingly similar to C++ namespace notation.