Re: Python (was Re: I did not inhale)

Liste des GroupesRevenir à c editors 
Sujet : Re: Python (was Re: I did not inhale)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.misc
Date : 27. Aug 2024, 22:34:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <valgpu$34s18$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Pan/0.160 (Toresk; )
On Tue, 27 Aug 2024 11:26:18 +0100, Bart wrote:

(2) You want to temporarily comment out an 'if' line so that the
following block is unconditional. You can't do that with also
unindenting the block.

In Emacs, I have commands defined to adjust the indentation of the
selected region. Surely any other decent editor would offer the same.

And, also  the block then merges with the
following one as it's at the same level, so when you want to change it
back...

This is where my “#end” comments come in.

(6a) And maybe there's big comment blocking in the middle of block;
comments don't need nesting! If there are lots of comments and few
statements, finding the end of the block (ie. the last statement of this
block) can become quite an exercise.

Again, “#end” comments help with this.

(7) You take some Python code you've seen online (eg. in a usenet post)
and paste into your editor. Maybe you want to merge it with your own
code.
 
But its tabbing is all spaces; yours is all tabs. Plus invariably, the
whole thing has extra indentation (eg. the leftmost statement is already
indented). Or you want to copy code from within a block to a different
indent level.

Like I said, Emacs makes this easy. Also a quick application of “untabify”
will turn all tabs in the selected region to spaces, to match with the
rest of my code.

Date Sujet#  Auteur
8 Jun 25 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal