philh at comuno.freeserve.co.uk
Sat Jun 30 01:29:48 CEST 2001
On Fri, 29 Jun 2001 17:43:34 -0400, Tim Peters <tim.one at home.com> wrote:
>> It seems to me that optional-pass is obvious in its meaning,
>Sorry, I have no idea what it means. Like you want to be able to use "pass"
>in more places, but optionally? Or want not to have to use pass in some
>places where you must use it now? Or ...?
It means where now you have to say:
when you create an initially-empty construct, you will in
future be able to say:
and the pass keywords will be implied by the compiler. Perhaps
implied-pass is a better name?
>> but multi-liner comments aren't. There are three issues:
>> 1. what should be the character sequences to begin/end multi
>> line comments
>What do you have against the existing method? That is,
> """This is a multi-line comment.
> this part of the same comment.
> so is this."""
>It's truly a comment: a statement consisting of just a string is thrown
>away by the compiler, unless it's in a docstring position (is the first
>non-comment statement in a module, def or class).
I don't like this, because it just doesn't feel right to me. A
Comment should look different, syntactically, from a string literal.
Also, I suspect that docstrings are a source of inefficiency (OK,
I admit that's not a real problem when you have a short python program
and 128M of RAM).
>Or the other existing method:
> # This is a multi-line comment.
> # Although it sure looks like a sequence of
> # single-line comments <wink>.
This is truly bad, because it makes it harder to add new lines;
you have to type "# " repeatedly when adding new comment text, which
breaks the flow of thought -- at least it dores for me.
>There's really no point answering these questions on c.l.py: that they've
>been *asked* means the proposals are already controversial, so need PEPs to
>lay out all sides of the case. I don't know what "optional pass" means, but
>the multi-line comment business has come up many times, so it would be
>especially good to PEP that one, in order to lay it to rest (one way or
>another) for good.
I wasn't aware that you could just plonk a string literal around anywhere
and it get ignored, thus forming a comment. In the light of that,
my multi-line comment proposal may seem a bit pointless. So here's
what I will do: write a PEP for it if at least 2 people on this
newsgroup say they support the idea.
## Philip Hunt ## philh at comuno.freeserve.co.uk ##
More information about the Python-list