choice between quotes thoughts

Peter Hansen peter at engcorp.com
Thu Aug 9 08:56:53 EDT 2001


François Pinard wrote:
> 
> [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.

This would make it easier to write/use a utility which extracted
all human-targetted strings into an external database for supporting
multi-language capabilities...

Hmm, I'll have to scan our code and see if there is any particular
bias or style evident...

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list