[Python-Dev] Re: new syntax for wrapping (PEP 318)

Michael Chermside mcherm at mcherm.com
Wed Feb 25 14:37:19 EST 2004


Jim Jewett writes:
   [I'm not going to quote him... details at
    http://mail.python.org/pipermail/python-dev/2004-February/042685.html
   ]

Jim, thank you for putting this so clearly. I want to second just about
everything that you said. Since you've gone into it in great detail,
I'll try the brief, bullet-points version:

  The "def name [modifiers]:" is unpythonic because:
   * It re-uses the "[]" for a completely new purpose, unrelated
     to lists or indexing.
   * It relies heavily on punctuation (the placement of the ":").
   * It doesn't "read like english".
   * There's no good way for a newbie to look it up.

  All of these would be addressed by using a keyword. The only objection
  seems to be "we couldn't find a word we all liked". But that's hardly
  a good reason to go with pure punctuation.

Me, personally, I like "as". It works great for wrappers like classmethod,
and is a sufficiently generic word that it wouldn't offend my sense
of grammer when used with other kinds of wrappers. But like Jim I'm not
strongly in favor of any particular keyword, just against the use of
pure punctuation.

-- Michael Chermside



More information about the Python-Dev mailing list