PEP 308: Pep Update
Sheila King
usenet at thinkspot.net
Thu Feb 27 15:45:20 EST 2003
On 27 Feb 2003 08:14:43 -0800, alloydflanagan at attbi.com (A. Lloyd Flanagan)
wrote in comp.lang.python in article
<a8b7f07a.0302270814.21153c29 at posting.google.com>:
> Sheila King <usenet at thinkspot.net> wrote in message news:<b3jgg4.gs.1 at kserver.org>...
> > On Thu, 27 Feb 2003 00:06:21 -0600, "Norman Petry" <npetry1 at canada.com>
> > wrote in comp.lang.python in article
> > <pan.2003.02.27.06.06.21.230621 at canada.com>:
> >
> > > 3) reuses existing keywords (if, else) unlike similar proposals like 'x
> > > when C else y' which convey precisely the same meaning in a verbose and
> > > non-backwards-compatible way. Adding an entirely new reserved word solely
> > > for the benefit (?) of a rarely-used construct seems like an especially
> > > bad idea.
>
> Actually, I like 'x when C else y'. I don't see introducing a keyword
> for a new construct as too serious a problem. Also, I expect the
> construct to be used more often than many people seem to expect.
> OTOH, I don't have a serious problem with 'x if C else y'. So count
> me as +1.01 to 'when', +1 to 'if'.
I agree, also, with a preference for the 'when' over the 'if'. From a
readability standpoint, it would certainly clue someone who was not
familiar with that operator into the fact that it was a different construct
that they should look up (if they didn't just intuitively "get it", or
wanted to get the "official word" on the matter).
However, I can see good reasons for not introducing new key words. I do so
dislike it when new features are introduced that break older code. And I do
not have the experience in this area, to really have a "feel" for whether
the new keyword would break things. Therefore, I am more than happy to go
along with either construct.
> Of course, the way this discussion is going, by the time it's done,
> we'll be speaking Arcturan, and it will look something like 'x j^tar C
> bdor y'. :)
I think this tactic may help to prevent the vote from ever taking place. ;)
--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/
More information about the Python-list
mailing list