Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!txtfeed1.tudelft.nl!tudelft.nl!txtfeed2.tudelft.nl!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'instance,': 0.05; ':-)': 0.06; 'compiler': 0.07; 'subject:based': 0.07; 'python': 0.08; 'caller': 0.09; 'complicate': 0.09; 'content- type:multipart/signed': 0.09; 'filename:fname piece:signature': 0.09; 'programmers.': 0.09; 'syntax.': 0.09; 'programmer': 0.10; 'meaningful': 0.13; 'argument': 0.15; 'useful,': 0.15; 'ambiguous': 0.16; 'content-type:application/pgp-signature': 0.16; 'filename:fname piece:asc': 0.16; 'filename:fname:signature.asc': 0.16; 'highlighting': 0.16; 'illegal,': 0.16; 'kwargs': 0.16; 'otoh,': 0.16; 'subject: \n ': 0.16; 'subject:syntax': 0.16; 'syntax': 0.16; "wouldn't": 0.17; 'wrote:': 0.18; 'java': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; '(though': 0.23; 'differ': 0.23; 'high.': 0.23; 'pep': 0.23; 'keyword': 0.24; 'suggestion': 0.26; "i'm": 0.26; 'function': 0.27; 'code,': 0.27; 'variable': 0.28; 'assuming': 0.29; 'fixed': 0.29; 'looks': 0.29; 'error': 0.29; 'definition': 0.30; 'keywords,': 0.30; 'syntax,': 0.30; 'does': 0.32; 'list': 0.32; 'break': 0.32; 'familiar': 0.32; 'idea': 0.32; "can't": 0.32; "isn't": 0.33; 'sort': 0.33; 'header :User-Agent:1': 0.33; 'that,': 0.33; 'agree': 0.33; 'done': 0.34; 'to:addr:python-list': 0.34; 'someone': 0.34; 'done.': 0.34; 'to?': 0.34; 'message.': 0.34; 'fundamental': 0.34; 'short,': 0.34; 'something': 0.35; 'subject:/': 0.35; 'unless': 0.35; 'question': 0.36; '"you': 0.37; 'bound': 0.37; 'opposed': 0.37; 'but': 0.37; 'list,': 0.37; 'received:192': 0.37; 'think': 0.37; 'received:128': 0.37; 'could': 0.37; 'doing': 0.38; 'using': 0.38; 'somewhat': 0.38; 'steven': 0.38; 'some': 0.38; 'accepted': 0.38; 'received:192.168.0': 0.38; 'useful': 0.38; 'should': 0.39; 'else': 0.39; "it's": 0.40; 'to:addr:python.org': 0.40; 'might': 0.40; 'received:192.168': 0.40; 'happens': 0.40; 'more': 0.61; 'type': 0.61; 'matter': 0.61; 'your': 0.61; 'happen': 0.61; 'stop': 0.63; 'proposal': 0.66; 'day': 0.69; 'become': 0.69; 'lesson.': 0.84; 'notepad,': 0.84; 'premise': 0.84; 'sound.': 0.84; 'whatever,': 0.84; 'misuse': 0.91; 'proposal,': 0.93 Date: Sun, 18 Dec 2011 13:47:46 -0600 From: Evan Driscoll User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Pythonification of the asterisk-based collection packing/unpacking syntax References: <841f4d29-f50b-4b0b-912b-b497fb6e60ec@t16g2000vba.googlegroups.com> <15424060.724.1324183952802.JavaMail.geo-discussion-forums@prix23> <4eeda5fc$0$29979$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <4eeda5fc$0$29979$c3e8da3$5496439d@news.astraweb.com> X-Enigmail-Version: 1.3.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB8230FAEDE9B282091A5E2B0" 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: 84 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1324237712 news.xs4all.nl 6888 [2001:888:2000:d::a6]:49834 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17473 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB8230FAEDE9B282091A5E2B0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 12/18/2011 2:36, Steven D'Aprano wrote: > The barrier to new keywords in Python is very high. Not going to > happen for something that already has perfectly good syntax already > familiar to Python and Ruby programmers. Might else well try to get C > and Java to stop using "..." (ellipses). I agree to some extent; I did say my suggestion was somewhat an effort in brainstorming. (Though I would point out that, if you accept the premise of this PEP suggestion, "perfectly good" only sort of applies.) > The burden is that you complicate the compiler and reduce the pool of=20 > useful names available to the programmer. To be useful, the keywords ne= ed=20 > to be short, meaningful and memorable -- which means they're already us= ed=20 > in code, which you will break needlessly. OTOH, it wouldn't be the first time it was done. For instance, 'with'. > With operators that otherwise would be illegal, the programmer doesn't = > need to learn about varargs until they need to. With keywords, the=20 > programmer needs to learn "you can't use varargs or kwargs as variable = > names" practically from day 1. Yes, but it's not exactly a hard lesson. I can't think of any time where you'd have ambiguous syntax, so misuse could always produce a good error message. And keyword highlighting is something that basically all editors can do well... so unless you're opposed to using an editor more advanced than Notepad, you'll type in "varargs", it'll turn purple or whatever, and you'll go "oh that's a keyword." > So you're not just adding keywords, you're adding new syntax: something= =20 > which looks like a function call, but isn't a function call. Well, almost by definition these proposals consider adding syntax. > I'm going to pose the same question to you I have already posed to Eelc= o:=20 > in your proposal, what happens if the caller has shadowed the list buil= t- > in? Does argument l become a built-in list, or does it become whatever = > type list is currently bound to? > > Some more questions: > > Can varargs accepted arbitrary callables, or only a fixed set of known = > types? > > How does this differ from what can be done with annotations? These are questions I don't feel I can answer very well. I was giving my thoughts on what I would do or consider doing with the proposal assuming the fundamental idea is sound. Whether it should be accepted at all is a matter for someone else. :-) Evan --------------enigB8230FAEDE9B282091A5E2B0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJO7kNoAAoJEAOzoR8eZTzgHAMIAJk1z0VGyZaANFCK4Yxe6iOV 3tEVY6iNx3Ky4ggkfUirGxsVWYBg7DMU9l1O0ALG0U+G9peY9vC9RL7bR9naqBEY eeQhuIqKljmLxsc5uxdifatIxoicbx+JxZwijr0IkM2BkO2wkQ6erQ1HiuRTg37J FlJ9z8loP/F3aYJf7nKf9y+/40qWzLJSnCHaX/PLmDMi0TP6kDgs15EmXdxqLI4o sEEwxvNnR71HP8Wn49EDqeUbQwt5Usuv+t+k4KtQAGGGKyCdkKZ1tNF5Ym1ECM7d UvxaoUOc9o1G8opRdJ3kjksv/7hpuPxwZb2HseDgaC1VCaYWMb4iA3Xi/1Obfo8= =VVtn -----END PGP SIGNATURE----- --------------enigB8230FAEDE9B282091A5E2B0--