LWN.net Logo

Python - indentation sensitivity

Python - indentation sensitivity

Posted Apr 18, 2012 18:21 UTC (Wed) by juliank (subscriber, #45896)
In reply to: Python - indentation sensitivity by nye
Parent article: The H Speed Guide to Lua (The H)

The colon is there to improve readability. The colon makes Python code much easier to read, as you can immediately notice that the next line is in a deeper block just by looking at the current line.

The colon is one of the best things in Python.


(Log in to post comments)

Python - indentation sensitivity

Posted Apr 18, 2012 19:54 UTC (Wed) by JanC_ (guest, #34940) [Link]

It might also help to spot accidental vs. intended indentation.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds