Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   no inline comments (http://www.velocityreviews.com/forums/t329338-no-inline-comments.html)

Tomasz Stochmal 03-07-2004 06:13 PM

no inline comments
 
Hi


I have been using Python for the past 2 years in commercial environment

One lacking feature is inline comments like in C /* this is comnment */

What is a chance of introducing it to next release of Python ?


Regards,
Tom

Lawrence Oluyede 03-07-2004 06:19 PM

Re: no inline comments
 
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
"""


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

John Roth 03-07-2004 08:47 PM

Re: no inline comments
 

"Lawrence Oluyede" <raims@dot.com> wrote in message
news:s5ovemxbkt98$.13eip0ev07e55$.dlg@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."




John Roth 03-07-2004 08:54 PM

Re: no inline comments
 
"Tomasz Stochmal" <tom@peresys.co.za> wrote in message
news:f20ea932.0403071013.2d5e734c@posting.google.c om...
> Hi
>
>
> I have been using Python for the past 2 years in commercial environment
>
> One lacking feature is inline comments like in C /* this is comnment */
>
> What is a chance of introducing it to next release of Python ?


To get something like that into Python you need to

1) get some enthusiasm behind it here

2) submit a proposal (called a PEP) with a use
case that shows that the feature is worth more than
the code needed to make it work,

and 3) submit the code.

My own personal feeling goes along with the XP
crowd. A comment is a slight code smell: it says that
the code itself is not as expressive as it needs to be.

There are times when a comment is undoubtedly
justified, but I'd be more inclined to ask whether I
could fix the code so I didn't need the comment,
rather than whether I could fix the language so I could
comment better.

John Roth

>
>
> Regards,
> Tom





All times are GMT. The time now is 10:46 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57