PEP308: Yet another syntax proposal

Aahz aahz at pythoncraft.com
Wed Feb 12 00:25:19 EST 2003


In article <pan.2003.02.12.04.37.46.101462 at mn.rr.com>,
Anna <revanna at mn.rr.com> wrote:
>
>Y'know, when I finished my first Python script, I sent it to my tutor and
>asked: "So what's the Secret Master Pythonista way of doing this?" His
>response is etched in my mind: "Python isn't about taking 10 lines of
>perfectly clear code and collapsing it down into 1 line of obscure code.
>That's Perl..."
>
>And that keeps coming to mind as I'm reading all these "ternary operator"
>syntax proposals... Most of them, to my newbie eyes, are simply confusing,
>and seem to fly in the face of what I keep hearing Python is about. Maybe
>I'm just being dense, but I haven't seen any that are terribly clear; the
>worst ones make me want to pull out a pencil and paper and sit down with
>the docs in front of me to try and figure out what the heck it's supposed
>to *do*...
>
>...which seems really odd for code that's supposed to be easily readable.

That, in a nutshell, is what this argument is about.  The problem is,
there's a natural tension for expert programmers to want to express
themselves easily and tersely, and there's a natural tendency for
programming language designers to cater to that.  In a very real sense,
it's no different from the desire of someone with an encylopedic
knowledge of a language desiring to find the single perfect word to
express meaning rather than relying on a more complex phrasing.  Python
has so far done an excellent job of maintaining a balance between all the
different tensions; those who are unutterably opposed to any form of
conditional expression fall completely into your camp.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Register for PyCon now!  http://www.python.org/pycon/reg.html




More information about the Python-list mailing list