Hi all,
Since there is a 'coding style' standard:
Use double quotes not single quotes. Single quotes are allowed in
cases where a double quote is needed in the string. This makes the
code read cleaner in those cases.
I have tried to use double quotes on my projects, but I am getting
annoyed/tired of pushing the shift-key so often. I know it makes
escaping strings in 'help_text', etc. that contain apostrophes a
little easier, and they read cleaner as a result, but overall I am
guessing that it results in a ton of more keystrokes as a result of
shift. urls, models, settings, etc. Strings that don't contain
documentation all have to use double quotes as a result of this
standard.
Also the django documentation for the majority seems to favor single
quotes, and the majority of snippets and reusable apps I've come
across as well. I often find myself replacing signle with double
quotes when I bring 3rd party code into my projects. It seems that
single quotes is the larger django community standard, and pinax is
the one going against the grain here.
http://code.djangoproject.com/browser/django/trunk/django/conf/project_template/settings.py
http://docs.djangoproject.com/en/dev/intro/tutorial03/
http://docs.djangoproject.com/en/1.2/topics/db/models/
http://docs.djangoproject.com/en/1.2/ref/settings/
http://djangosnippets.org/tags/settings/
http://djangosnippets.org/tags/models/
http://djangosnippets.org/tags/urls/
In the case where the contents isn't documentation, the single quotes
more often read cleaner, IMO the double are slightly more visually
distracting:
'django.contrib.sites',
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.admin',
as opposed to:
"django.contrib.sites",
"django.contrib.auth",
"django.contrib.sessions",
"django.contrib.admin",
I am happy that there is a standard, though reversing it as this point
may be more trouble than it's worth. Is anyone else experiencing
similar annoyances?
best,
Thomas
--
You received this message because you are subscribed to the Google Groups
"Pinax Core Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pinax-core-dev?hl=en.