[Python-ideas] "else if" as equivalent for "elif"

Emanuel Barry vgr255 at live.ca
Sun Oct 25 21:28:16 EDT 2015


Here is yet another argument against this change -- indentation. Indentation is, as we all well know, one of the core aspects of Python's syntax. In every project I have worked on, and in PEP 8 ( https://www.python.org/dev/peps/pep-0008/#indentation ), 4-space indents are used. 'elif' is exactly 4 characters long, which means it lines up pretty well with other similar keywords such as 'else' or 'for' (with the space that follows it). In that regard, 'else if' would actually make code *harder* to read, not easier! In the same sense that 'def' (followed by a space) makes it very easy to spot the functions' names (if for some reason you don't have syntax highlighting ... ), 'elif' makes it easy to spot the beginning of another condition statement within a block.
Cheers,-Emanuel Barry 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20151025/cd7e0183/attachment.html>


More information about the Python-ideas mailing list