Python indentation deters newbies?

Mark Jackson mjackson at alumni.caltech.edu
Fri Aug 13 13:10:32 EDT 2004


Dave Brueck <dave at pythonapocrypha.com> writes:
> beliavsky at aol.com wrote:
> 
> > One of the most commmon reasons programmers cite for not trying Python
> > is that indentation determines the program flow -- they think its
> > weird.
> 
> Yes, that is commonly cited. From the programmer's perspective, 
> indentation implies program flow in nearly *all* modern languages. The 
> difference is that in Python the compiler believes you.
> 
> > I think programmers who actually try Python adapt quickly and
> > do not find the indentation rules to be a problem.
> 
> Yep!
> 
> > I wonder if there is a way to remove this initial barrier.
> 
> I sure hope not... if someone can't accept that there might be value in 
> it being different than what they're used to (so much so that they're 
> unwilling even to give it a try), then the indentation is only the first 
> of many things that will give them problems.
> 
> In that sense it's really useful - maybe it weeds out people who 
> wouldn't be happy in Python yet anyway <0.5 wink>.

To this end, it's worth remembering that Eric Raymond has described
indentation-based blocking as Python's /pons asinorum/:
http://www.linuxjournal.com/article.php?sid=3882

-- 
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
	Fascism should more properly be called corporatism, since it
	is the merger of state and corporate power.
				- Benito Mussolini





More information about the Python-list mailing list