ignoring blank lines in input
tnb2d@henson.cs.virginia.edu
Thu, 26 May 94 12:18:01 EDT
It seems that people are more concerned with changing the
syntax of Python when entering code interactively than when actually
writing a module full of code and then executing it. The whole
problem with empty lines (which has been brought up repeatedly) is
only relevant when entering code interactively. As Guido pointed out
the regular (non-interactive) parser pays no mind to blanks and
comments. This is not meant to squash the change-the-syntax debate
going on (although IMHO we should leave it all alone, I mean how could
you discount Python for using whitespace as a block delimiter and then
embrace the whole-sale gobbledy-gook syntax of tcl as MORE
USABLE?!?!?!?!?!) but could perhaps fix this one small problem.
Right now when entering code interactively an empty line (that
is not inbetween unclosed braces, or brackets, or quotes, or
parentheses) terminates the current block, no? On my SparcStation I
hit ctrl-d to end my interactive session. This has nothing to do with
the language, it goes straight to the running process and does the
right thing. Can't we implement something like ctrl-q (or whatever,
as long as it's not alredy in use) that does this for terminating
blocks? It just seems that a portion of the problem here is with the
mechanics of the interactive-mode Python, and not necessarily the
language itself.
P.S. For those who want block delimiters so they can use primitive
text entry widgets, perhaps building a better widget yourself, say a
multi-line text-editor/entry widget, would be the solution.
P.P.S. Python uber alles....
-------> Tommy.
"Subvert the parental paradigm - Refuse Birth."