(PEP-308) Python's Conditional Selection Operators

Terry Reedy tjreedy at udel.edu
Sat Feb 15 12:22:44 EST 2003


"Stephen Horne" <intentionally at blank.co.uk> wrote in message
news:k1lr4vk1ldm91rc5f5j77b6mcusjo5vefr at 4ax.com...
> On Fri, 14 Feb 2003 20:50:10 -0800, Erik Max Francis
<max at alcyone.com>
> wrote:
>
> >Of course it hasn't.  But your declaring something as not being
> >"standard" does not make it so.  There _is_ no "standard," there's
just
> >what different languages do.
>
> A 'de facto standard' doesn't require a comittee. No-one mentioned
ISO
> or ANSI or the like. Most languages follow the same convention. That
> is all it takes to make it a de facto standard. As 'de facto
standard'
> was the only sensible interpretation of what Terry said, IMO there
was
> nothing wrong with his use of the word 'standard'.

I clarified my usage in the self-followup I just posted.

> Perhaps 'convention' might have been a better word. The term
> 'standard' seems to imply that everything else is wrong. But then
> again, 'conventional' somehow suggests an old, dated concept that
> needs replacing. I doubt that Terry intended either judgement.

Correct.  Other than the two explicit and intentional judgment
statements that I recall, I tried to stick with definitions and facts.

> The explanation, though, is simple enough. In statically typed
> languages, the generalised 'and' and 'or' simply wouldn't work. The
> left and right arguments often have different types so they need to
be
> able to return a dynamically typed result.

I presume you mean that they have to be cast to a common type, such a
C does with all scalers.

> I have my doubts - the use of the selective logic operators are, for
> my money, too different from the everyday English use of the words -
> though of course that doesn't quite match the boolean algebra use
> either.

I intentionally did not discuss common usage of and and or, where
meanings shift and may even be the same.

Terry J. Reedy






More information about the Python-list mailing list