New to Python - block grouping (spaces)

alister alister.nospam.ware at ntlworld.com
Thu Apr 16 09:46:24 CEST 2015


On Wed, 15 Apr 2015 21:07:45 -0700, Blake McBride wrote:

> Greetings,
> 
> I am new to Python.  I am sorry for beating what is probably a dead
> horse but I checked the net and couldn't find the answer to my question.
> 
> I like a lot of what I've seen in Python, however, after 35 years and
> probably a dozen languages under my belt, I very strongly disagree with
> the notion of using white space to delimit blocks.

as others have suggested this is a core to python as it enforces 
readability. Many new python programmes find it strange but usually take 
to it quite quickly.

what I find strange is that although these programmers initially disliked 
forced indentation they were voluntarily indenting there existing code 
anyway. Take a look at your existing code base & see if this would indeed 
be the case.

Stephens suggestion of using comments @ the start & end of your blocks 
may be useful during the learning phase.





-- 
Battle, n.:
	A method of untying with the teeth a political knot that
	will not yield to the tongue.
		-- Ambrose Bierce



More information about the Python-list mailing list