choice between quotes thoughts

David Bolen db3l at fitlinxx.com
Thu Aug 9 16:52:37 EDT 2001


Roman Suzi <rnd at onego.ru> writes:

> I wonder if there are idiomatic differences between quotes, but
> who knows? (apart from cases mentioned in the Style Guide)

For me, although initially it was most common to use " due to C/C++ as
an immediate predecessor language, I've moved over to using ' as the
preferred quote - except in mostly two cases:

* Strings containing ' (for which the most typical reason for me is
  writing SQL strings).
* Triple quoted strings (especially doc strings).

I think at least part of it is that ' is less dense than " when
viewing source, so it tends to stay out of the way a little bit more
for me.  And that's probably the same reason I still use " for the
triple quoted strings, as its density makes it easier to envision that
as a single token.

I hadn't thought about it until now, but back when I was a heavy Rexx
(same possibilities) user I ended up in the same state, so I must like
it this way :-)

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list