Python scoping

SuppamanX suppamanx at collector.org
Mon Oct 23 23:42:39 EDT 2000


   I have been using Python off and on for 6 months now and have grown to 
love it from the beginning. However, there is a facett of Python that 
annoys me somewhat. It is the 'scoping by indentation'. Coming from a 
background of 'formal' languages (e.g. Pascal, C, Java,...), I am 
accustomed to explicitly start and end my scopes with a braces. From a 
readability standpoint, it gets quite problematic for especially for some 
of the example code that I am trying to learn from.

Can someone clarify why there is no explicit end for scopes?
(i.e. IFs, FORs, WHILEs, METHODs, etc...)

Thanx



More information about the Python-list mailing list