Use of a variable in parent loop

Joe Pfeiffer pfeiffer at cs.nmsu.edu
Sun Sep 27 12:47:20 EDT 2020


Stephane Tougard <stephane at sdf.org> writes:

> On 2020-09-27, Stefan Ram <ram at zedat.fu-berlin.de> wrote:
>>>Is there any other instruction to end a if than pass and ensure Emacs
>>>does not break the indentation during a copy paste or an indent-region ?
>>
>>   We usually do not wish to tie our code to a defective editor.
>>   I use vi, and can assure you that there is no such restriction
>>   in a real editor.
>
> You do not answer the question. I consider that indentation alone is not
> enough to make the end of a block. It's not a question of editor and I
> had some issues with vim as well because of that.
>
> pass looks good to me to end a if block, continue is good to end a for
> block and return is good to end a def block. If that's NOT good, just
> tell me why and give me another solution to end a block who is not the
> indentation because an indentation is not good enough for me to end a
> block and it may trigger some problem when using different editors or
> tools on the code.

The language designers appear to disagree with you.

Decades ago I learned C after having first become proficient in Pascal,
and *really* didn't like the terseness of the block beginning and ending
symbols.

So, I went through a phase in which I wrote lots of macroes like
#define begin {
#define end }

and so forth.  What I discovered in fairly short order was that it made
it easier for me to read my own code, but did absolutely nothing for
either me reading other people's code, nor for them reading mine.  I
eventually concluded my best move was to just suck it up and learn to
program in the language as intended.


More information about the Python-list mailing list