no inline comments

Discussion in 'Python' started by Tomasz Stochmal, Mar 7, 2004.

  1. 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
    Tomasz Stochmal, Mar 7, 2004
    #1
    1. Advertising

  2. 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."
    Lawrence Oluyede, Mar 7, 2004
    #2
    1. Advertising

  3. Tomasz Stochmal

    John Roth Guest

    "Lawrence Oluyede" <> wrote in message
    news:s5ovemxbkt98$.13eip0ev07e55$...
    > 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, Mar 7, 2004
    #3
  4. Tomasz Stochmal

    John Roth Guest

    "Tomasz Stochmal" <> wrote in message
    news:...
    > 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
    John Roth, Mar 7, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,117
  2. Monk
    Replies:
    10
    Views:
    1,461
    Michael Wojcik
    Apr 20, 2005
  3. Mike Schwab

    inline comments in future release?

    Mike Schwab, Jul 24, 2008, in forum: Ruby
    Replies:
    23
    Views:
    252
    Robert Klemme
    Jul 27, 2008
  4. Mitko Kostov
    Replies:
    0
    Views:
    135
    Mitko Kostov
    Mar 31, 2010
  5. Replies:
    4
    Views:
    603
    Dr John Stockton
    Jun 3, 2006
Loading...

Share This Page