![]() |
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 |
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." |
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." |
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.