Top "Coding-style" questions

**DO NOT USE!

Python style - line continuation with strings?

In trying to obey the python style rules, I've set my editors to a max of 79 cols. In the PEP, …

python coding-style
Why does PEP-8 specify a maximum line length of 79 characters?

Why in this millennium should Python PEP-8 specify a maximum line length of 79 characters? Pretty much every code editor under …

python coding-style pep8
A free tool to check C/C++ source code against a set of coding standards?

It looks quite easy to find such a tool for Java (Checkstyle, JCSC), but I can't seem to find one …

c++ c coding-style
Should import statements always be at the top of a module?

PEP 08 states: Imports are always put at the top of the file, just after any module comments and docstrings, and …

python optimization coding-style
Switch statement fall-through...should it be allowed?

For as long as I can remember I have avoided using switch statement fall-through. Actually, I can't remember it ever …

coding-style switch-statement
pythonic way to do something N times without an index variable?

Every day I love python more and more. Today, I was writing some code like: for i in xrange(N): …

coding-style for-loop python
Advantages of std::for_each over for loop

Are there any advantages of std::for_each over for loop? To me, std::for_each only seems to hinder …

c++ stl foreach coding-style
Are PHP short tags acceptable to use?

Here's the information according to the official documentation: There are four different pairs of opening and closing tags which can …

php coding-style php-shorttags
What is the purpose of wrapping whole Javascript files in anonymous functions like “(function(){ … })()”?

I have been reading a lot of Javascript lately and I have been noticing that the whole file is wrapped …

javascript scope coding-style iife
Python coding standards/best practices

In python do you generally use PEP 8 -- Style Guide for Python Code as your coding standards/guidelines? Are there …

python coding-style