Python Comments

  • Comments posted to this topic are about the item Python Comments

  • Interesting, thanks Steve

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • The given answer is not correct. Python does not in fact have multi-line comments.

    Triple quoted text is NOT a comment, it is a string. The fact the language's inventor suggested this as a workaround does not change the fact it is NOT a comment. To prove this make it a variable assignment and it will work.

    This is one short coming in Python I'd like to see addressed, but one that most likely never will be now that triple quoted text is so widely accepted as the workaround.

    (Guilty secret: I even use it myself :))

  • roger.plowman - Wednesday, June 6, 2018 6:36 AM

    The given answer is not correct. Python does not in fact have multi-line comments.

    Triple quoted text is NOT a comment, it is a string. The fact the language's inventor suggested this as a workaround does not change the fact it is NOT a comment. To prove this make it a variable assignment and it will work.

    This is one short coming in Python I'd like to see addressed, but one that most likely never will be now that triple quoted text is so widely accepted as the workaround.

    (Guilty secret: I even use it myself :))

    That what's i was going to say!  Most editors allow you to block text and do it in one swell foop which helps.

  • roger.plowman - Wednesday, June 6, 2018 6:36 AM

    The given answer is not correct. Python does not in fact have multi-line comments.

    Triple quoted text is NOT a comment, it is a string. The fact the language's inventor suggested this as a workaround does not change the fact it is NOT a comment. To prove this make it a variable assignment and it will work.

    This is one short coming in Python I'd like to see addressed, but one that most likely never will be now that triple quoted text is so widely accepted as the workaround.

    (Guilty secret: I even use it myself :))

    DITTO, I found this during my research. 
    https://www.codecademy.com/en/forum_questions/505ba3cfc6addb000200e33c

  • Good catch. Updated to note only # isfor comments and removed the multiline answer.

  • Nice question.  Thanks Steve.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply