2.3. CommentsAs with most scripting and Unix-shell languages, the hash or pound ( # ) sign signals that a comment begins from the # and continues until the end of the line. >>> # one comment ... print 'Hello World!' # another comment Hello World! There are special comments called documentation strings, or "doc strings" for short. You can add a "comment" at the beginning of a module, class, or function string that serves as a doc string, a feature familiar to Java programmers: def foo(): "This is a doc string." return True Unlike regular comments, however, doc strings can be accessed at runtime and be used to automatically generate documentation. |