no inline comments

John Roth newsgroups at jhrothjr.com
Sun Mar 7 21:47:54 CET 2004


"Lawrence Oluyede" <raims at dot.com> wrote in message
news:s5ovemxbkt98$.13eip0ev07e55$.dlg at 40tude.net...
> In data 7 Mar 2004 10:13:46 -0800, Tomasz Stochmal ha scritto:
>
> > One lacking feature is inline comments like in C /* this is comnment */
> >
> > What is a chance of introducing it to next release of Python ?
>
> What do you mean? You can use the triple quote:
>
> """
> This is a multiline
> inline comment
> """

That's not a comment. It's a string. Try putting
it in the middle of another statement and you'll
see the difference.

The reason it looks like a comment is that a string,
all by itself, is a perfectly valid expression, so you
can put one wherever you could put a statement.

John Roth
>
>
> -- 
> Lawrence
> "Avevo Halo, poi è arrivato Zelda... e ho buttato Halo."





More information about the Python-list mailing list