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

Diez B. Roggisch deets at nospam.web.de
Fri Mar 9 09:31:45 EST 2007


dbhbarton at googlemail.com wrote:

> On 9 Mar, 14:05, "Diez B. Roggisch" <d... at nospam.web.de> wrote:
>> But you _can't_ profit from these conveniences, at least not the ?
>> character. It's just garbage put in there for some others to interpret,
>> meaningless to the interpreter. So it _always_ boils down to
>> editor-support.
> 
> I'm sorry I don't follow your logic. Meaningless to the interpreter,
> yes, meaningless to the IDE or to me, no. I "_can't_ profit from these
> conveniences"? Why ever not?

Exactly, the ? is meaningless to the language itself, it's only a comment
sign - but what you want is 

"""
1. The WIP (Work In Progress) comment:

A '?' placed in the preceding whitespace of a line as a means of
quickly highlighting a line or block of code for special attention.
"""

Now tell me - how exactly do you highlight a text? That is solely part of
the editor you use, either it will parse the ?  - the same way it would
parse a # fixme or # wip comment - and react accordingly, or it won't.

But for python itself, it has no meaning whatsoever, and would just be a
character to overread, introducing visual clutter.

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. But it has nothing to do with _python_ the language, so it doesn't
belong there.

Besides, I don't see how "quick highlighting of text" is something that
needs to be persisted anyway - if it is quick, hightlight it within the
editor until the file is closed. If not, it might be well worth a comment
anyway why you think it needs special attention.

Diez



More information about the Python-list mailing list