[Tutor] Does the Python way of doing things have a definite preference for the structure and content of program file header comments?
alan.gauld at btinternet.com
Thu Jan 22 23:51:44 CET 2015
On 22/01/15 21:17, boB Stepp wrote:
> And will this vary depending on whether a version control system is
> being used or not? Or is the use of a version control system
> considered to be highly recommended (if not mandatory)?
Virtually nothing in Python is mandatory - unless you plan on putting
your code in the standard library. But the standard library is aq good
template to follow...
As to headers, I tend to put version control type stuff in real comments
(author, version, date etc) and put comments about functionality in doc
strings where the help() function can find them.
There is a kind of standard presentation of doc strings; use help
a few times and you'll see. But it's not mandatory in as much as
everything will continue to work if you ignore the conventions.
Author of the Learn to Program web site
Follow my photo-blog on Flickr at:
More information about the Tutor