[Python-ideas] "else if" as equivalent for "elif"
MRAB
python at mrabarnett.plus.com
Wed Oct 21 16:30:53 EDT 2015
On 2015-10-21 20:49, Geoffrey Spear wrote:
>
>
> On Wed, Oct 21, 2015 at 3:26 PM, MRAB <python at mrabarnett.plus.com
> <mailto:python at mrabarnett.plus.com>> wrote:
>
> The C preprocessor has #elif. Is that strange too? :-)
>
> (It could be argued that it _is_ strange that the C preprocessor has an
> explicitly-terminated "#if ... #endif", whereas the C language itself
> doesn't have an explicitly-terminated "if".)
>
>
> "We stole this short spelling from C" shouldn't be an argument in favor
> of any spelling, in my opinion.
>
> (Not creating a second way to do something or deprecating a language
> keyword is a much stronger argument, of course; I'm as opposed to this
> proposal as I'd be to a propose to rename strptime and strftime, but I'd
> also think "but that's how C spells them!" would be a bad argument in
> that case. Don't even get me started about Popen objects...)
>
Modula-2 spells it "elsif". The problem there is that you then have to
be very
careful when talking about it to someone else: "Did you say 'elsif' or
'else if'?"
More information about the Python-ideas
mailing list