2 new comment-like characters in Python to aid development?

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Fri Mar 9 18:34:08 EST 2007


dbhbarton at googlemail.com wrote:

> But # is 'only a comment sign' as well, and equally meaningless to
> the interpreter. 

No! "#" means "disregard everything until EOL" to the interpreter.
Your proposed highlighting character means exactly nothing to the
interpreter. Get the difference?

> But it's still part of the language, very very 
> useful and I profit from its existence every day.

See above, comment tokens do have syntactical meaning.
 
> If you can highlight an entire block with a single character,
> won't there be _less_ visual clutter than the current way of
> achieving the same effect with # comments?

You can't "highlight" something with comments. It will become a
comment and not be executed.

Some editors may display comments in a different manner, yes. But
that's not what comments are for -- the different display is just
for convenience.

>> So - if you want that feature, patch your editor of choice to
>> deal with that comments, make them added and removed with a key
>> stroke, whatever - be my guest.
> 
> Would if I could!

Why don't you grab a good editor ...
 
> What we're talking about here is a form of 'alternate commenting
> style'. With the IDE's cooperation it'd work on whole blocks at
> once,

I know editors that can select blockwise without any special
characters in the source, just by keystrokes ...

> it would highlight without disrupting the code concerned (at 
> least the way I'm envisaging it), it would be versatile (could
> probably be used for as big a variety of purposes as the #
> comment),

Any kind of highlighting is absolutely different from comments.

> and yes, it'd be persistent, which is how it would be 
> different from any IDE-based highlighting.

(Why shouldn't other ways of highlighting be persistent? Metadata
exists.)
 
> I think that'd be most useful. You don't. So far nobody else here
> does either, and I've not persuaded anybody differently. Fair
> enough!

Agreed.

Regards,


Björn

P.S.: More and more I'm getting the impression that everybody should
first learn to program with a most simple editor. The typical
Java+Eclipse start is wrong, IMHO ...

-- 
BOFH excuse #225:

It's those computer people in X {city of world}.  They keep stuffing
things up.




More information about the Python-list mailing list