Codig style: " or """

Steven Bethard steven.bethard at gmail.com
Wed Apr 13 11:36:09 EDT 2005


Sara Khalatbari wrote:
> Hi!
> 
> Suppose you're writing a module & writing the
> definition of each function in that module in " or
> """.
> for example:
> a) "This function does this & that"
> or:
> b)  """This function does blah blah blah"""
> 
> What are the differences between " and """ ? 
> I'm using gedit & I wanna know a bit about coding
> style.
> 
> To be very honest: I have a very strict boss who looks
> for bugs in my codes & he insists to know exactly
> which 'CODING STYLE AUTHORITATIVE SOURCE' I've based
> my coding style on when using " or """.
> 
> Can anybody out there give me some hint?
> Can anybody tell me where to find a document on python
> coding style.

PEP 8:

http://www.python.org/peps/pep-0008.html

and for docstrings, PEP 257:

http://www.python.org/peps/pep-0257.html

which says:

For consistency, always use """triple double quotes""" around docstrings.

STeVe



More information about the Python-list mailing list