Teaching Programming

Andre Engels andreengels at gmail.com
Tue May 4 11:00:11 EDT 2010


On Tue, May 4, 2010 at 4:35 PM, James Mills
<prologic at shortcircuit.net.au> wrote:
> On Wed, May 5, 2010 at 12:21 AM, Ed Keith <e_d_k at yahoo.com> wrote:
>> To deal with indentation I had to
>>
>>   1) keep track of indentation of all chunks of code embedded in the
>>      document and indent inserted chunks to the sum of all the
>>      indentation of the enclosing chunks.
>
> In my experience of non-indentation sensitive languages
> such as C-class (curly braces) it's just as hard to keep track
> of opening and closing braces.

Although I have little or no experience with this, I still dare to say
that I don't agree. The difference is that in C you do not _need_ to
know where in the braces-defined hierarchy you are. You just embed or
change a piece of code at the right location. In Python however you
_do_ need to know how far your code is to be indented.


-- 
André Engels, andreengels at gmail.com



More information about the Python-list mailing list