Larry Wall's comment on python...

Jack D. Hammer thisisabogusemail at
Tue Sep 10 18:26:50 CEST 2002

One good argument for having block delimiters is for embedded situations like 
ASP.  One can conditionally put code into a block as such (ASP is rusty):

		if (some_condition) {
		<td>some data</td>
		<td>some more data</td>
	} // closing curly

I would think that for embedding python, having block delimiters would be 

brueckd at wrote:
> On 8 Sep 2002, Brian Slesinsky wrote:
>>He's repeating the standard newbie complaint.  However, I think the
>>fact that so many people have repeated this for so long is
>>significant.  Long-term Python programmers tend to forget how weird it
>>is to some newcomers to end a function or class just by *stopping*. 
>>It feels abrupt and rather fragile, particularly when you don't have a
>>firm grasp of the language.  If newbies have complained for this long,
>>the complaint's not going away, and if we're serious about making
>>Python easy to pick up it might be good to listen.
> Yes, the fact that so many newbies complain about it is very significant.  
> Perhaps we need to do a better job of presenting the concept. For example,
> instead of tossing it out there and then defending against complaints
> perhaps it would be better to take the offensive: first make a case for
> why the "normal" way to delimit blocks has its drawbacks, and then present
> the Python way as a solution to a problem.
> But just because people consistently complain about something does not
> mean the answer is to bow to their wishes. From an arrogant point of view,
> they're newbies, so what do they know? ;-) Seriously though, I enjoy
> Python because it _is_ different - and I usually derive benefit from the
> ways in which it is different (i.e. - it's not different for arbitrary or
> random reasons). It's significant that lots of newbies complain about "no
> curly braces", but it's as least as significant that once people use it
> for awhile they tend to end up liking it.
>>Of course it's unnecessary and should be entirely optional.  Putting
>>an "end" after every block would certainly be overly verbose and bad
>>style.  But ending major blocks in a way that's syntax-checkable might
>>catch the occasional indentation error and/or make error messages
> Well, as you know you can always do an "# end" comment which really gives 
> much of the same benefit. At the bottom of my Emacs window it tells me 
> which block I'm closing (e.g. "Closes block: ...try:"), other editors 
> probably do the same. Also, it seems like whenever it's not readily 
> apparent which block I'm in, then the _real_ problem is sloppy code on my 
> part.
> -Dave

More information about the Python-list mailing list