Use of a variable in parent loop

Chris Angelico rosuav at gmail.com
Sun Sep 27 07:15:30 EDT 2020


On Sun, Sep 27, 2020 at 9:01 PM Stephane Tougard via Python-list
<python-list at python.org> wrote:
>
> 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.

Why? What benefit do you gain by having a keyword like that?
Indentation DOES end a block, and adding a noise word just before you
unindent just leaves the possibility for it to be incorrect and thus
misleading - not to mention that it's fundamentally misleading to
anyone who is accustomed to Python syntax and the normal use of those
keywords.

If you MUST use a block-end marker, try "# end" instead - at least
then everyone *knows* it's nothing more than a comment.

ChrisA


More information about the Python-list mailing list