Larry Wall's comment on python...

Peter Hansen peter at
Mon Sep 9 14:01:36 CEST 2002

Brian Slesinsky wrote:
> significant.  Long-term Python programmers tend to forget how weird it
> is to some newcomers to end a function or class just by *stopping*. 

I don't forget how weird it was to me as a newcomer.  I also remember,
however, that about fifteen minutes after writing *real* code with it,
I realized it was not weird at all, but very sensible and readable.

> I also think there would be a certain satisfaction in having a proper
> ending, even for folks who are entirely comfortable with Python's
> indentation.  It's like "Q.E.D." at the end of a proof, or "The End"
> at the end of children's book, or signing a message even though the
> "From" header line makes it entirely redundant.

There's some truth in that.  I often end my files with a line that
reads "# EOF", which helps me not try to scroll down to find more
code, and when I print the file (rare) I can be sure I've found the
last page of code.

On the other hand, I always put "// EOF" in my C++ and Java code,
and /* EOF */ in my C code, so this bit has nothing to do with
block structures.

And I'd regard a strong desire to do something similar after
every single block as an unnatural compulsion.  Therapy would be
a good next step for people with this problem.  <0.87 wink>


More information about the Python-list mailing list