Why """, not '''?

D'Arcy J.M. Cain darcy at druid.net
Wed Mar 5 10:13:59 EST 2008


On Wed, 5 Mar 2008 06:56:24 -0800 (PST)
MartinRinehart at gmail.com wrote:
> Why is """ the preferred delimiter for multi-line strings?

Where did you see that?  The only place I saw it was the style guide
and it was only talking about docstrings.  Even there they used """ as
an example but the text talked about using triple quotes as opposed to
single quotes even when it is a single line docstring.  I don't think
that there is any preference for """ over ''' in general.  Pick one for
consistiency.

Note however that """ can't be confused with " followed by ' as in "'A'
is the first letter of the alphabet."

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list