View Full Version : comments?
EscapeCharacter
07-15-2002, 08:04 AM
what the normal way to comment in python? ive seen two ways
the 3 double quotes """
"""this is a comment"""
and the hash #
#this is also a comment
jemfinch
07-15-2002, 10:36 AM
You're confusing docstrings and comments. If you see the quotes, it's a docstring (or just a literal multiline string in the program). The only comments in Python use hashes.
Jeremy
Ah... the escape character checkin' out python. :D :D :D
Like jemfinch said, the """ is the same as " or ' except that you can span multiple lines with it.
Strike
07-15-2002, 02:55 PM
And Guido suggests that all docstrings use """s, btw.
EscapeCharacter
07-19-2002, 07:09 PM
heh weird, ok thanks for clearifying :)
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.