PEP 308: Pep Update
Robin Becker
robin at jessikat.fsnet.co.uk
Thu Feb 27 15:14:21 EST 2003
In article <mailman.1046363599.31087.python-list at python.org>,
sismex01 at hebmex.com writes
>> From: Robin Becker [mailto:robin at jessikat.fsnet.co.uk]
>> Sent: Thursday, February 27, 2003 3:23 AM
>>
.....
>> If we rigorously adopted your approach then 'a+y' would have to be
>> replaced by 'a add y' or similar. It may be that poor 'dumb'
>> programmers can't hack symbols if so we're in real trouble.
>>
>
>No need to refute an opinion by taking it to an extreme
>and making it absurd (reduction to absurdum?). After all,
>Norman isn't talking about eliminating operators, but
>expressing his opinion on *WHY* he believes that the
>conditional ternary operator should be in the form
>(TRUE if COND else FALSE) instead of (COND ? TRUE : FALSE),
>**in Python's specific case**.
......mea culpa. I should just say nothing when given the teaching
argument. Math is also taught and given the above argument we should
presumably teach '1 add 2' rather than '1+2'. This breaks down only
because of prior usage (ie the existing mathematical language). In the
same way the existing usage by C/C++ programmers requires strong
arguments to void its adoption.
My objection is first to the ordering and then to wordiness.
>
>In my opinion (using parens just for clarity):
>
>+1: ( TRUEVAL if CONDITION_TRUE else FALSEVAL )
>
>+0.5: ( TRUEVAL else FALSEVAL if CONDITION_FALSE )
> ( when CONDITION_TRUE then TRUEVAL else FALSEVAL )
>
>+0: no changes.
>
>-1: C-style syntax.
>
>-gustavo
>
--
Robin Becker
More information about the Python-list
mailing list