choice between quotes thoughts
François Pinard
pinard at iro.umontreal.ca
Thu Aug 9 08:26:37 EDT 2001
[Roman Suzi]
> After some time working with Python I noticed that I use "-s and '-s
> according to the following rule: I use "" quotes when I specify value
> MANUALLY. That is, in most cases. On the other hand, I use '' where
> quotes are generated automatically. This is consistent with repr(),
> which gives ''.
Observing myself, I noticed that I use "..." for text meant to be displayed
and read by a human, and '...' for more internal, programmatic strings.
It works well for me, to the point I turned this into a personal style rule.
> The same rules differenciate """ and '''.
And similarly for my own style rule about simpler quotes.
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list