[Python-Dev] On quote styles

skip at pobox.com skip at pobox.com
Sat May 10 16:29:45 CEST 2008


Moving from python-checkins and giving this topic a proper subject.  The
original thread started here with a checkin by Benjamin:

    http://mail.python.org/pipermail/python-checkins/2008-May/069181.html

While Python doesn't have a char type (yet), I still find the distinction
between 'c' and "abc" useful to show intent (especially given my C
background and occasional but increasingly rare dip into the CPython
implementation).  I must admit though that I'm not as consistent with this
as I used to be or would like to be.  I guess that's because I'm lazy and
the byte compiler doesn't enforce that style.

I do prefer to use """ as the triple quote string delimiter because I find
that for most of my uses it makes more sense as apostrophes tend to be the
quote chars most frequently embedded in them (I don't do much, if any, HTML
these days).

This is, of course, all personal preference, and definitely not
PEP-8-able.

maybe-if-we-<wink>-uncle-timmy-will-sort-it-out-ly y'rs,

Skip



More information about the Python-Dev mailing list