choice between quotes thoughts

François Pinard pinard at iro.umontreal.ca
Sun Aug 12 11:12:16 EDT 2001


[Markus Schaber]

> I just use "..." for strings and '...' chars (Strings containing one
> char - this comes from Java where Chars can be given this way),

It might not be a good thing transporting all style habits from one
language to another.  In C or Java, it is true you did not have the choice.
In Python, you could put the acquired freedom to good use, instead of
forever and patiently pulling your prisoner's bullet with you :-).

I quite understand that writing styles are acquired with non-negligible
efforts, and grow their own worth because of this.  So, it is only normal
trying to recycle the most we can from them when wandering between languages.
On the other hand, some distance between styles for various languages
does help avoiding cross-confusion, it eases your own "context switching"
as a programmer, by having it more marked and less fuzzy.

Let me quote a example taken from my own little experience.  I conform
to most GNU standards when I write C, and to most Guido's standards when
I write Python.  So, in C, I would write "function (argument)" while in
Python I would write "function(argument)".  Despite a bit annoying in the
very beginning, that simple difference comes to be helping after a while.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list