[Python-Dev] [PATCH] Adding braces to __future__

francis francismb at email.de
Sat Dec 10 12:14:13 CET 2011

Hi Cedric,

On 12/09/2011 09:26 PM, Cedric Sodhi wrote:
> It is widely known among the programmer's community that spaces and tabs
> are remarkably similar to eachother. So similar even, that people fight
> wars about which to use in a non-py context. It might strike one as an
> equally remarkably nonsensical idea to give them programmatic meaning -
> two DIFFERENT meanings, to make things even worse.
> While it becomes a practical impossibility to spot these kind of bugs
> while reviewing code -- optionally mangled through a medium which
> expands tabs to whitespace, not so much of a rarity -- it is still a
> time-consuming and tedious job to find them in a local situation.

I'm not so experienced with python as the majority of
people here, but I've read that the practice is: do not to
mix them (spaces and tabs).

If this is taking much of you time while reviewing I would
recommend you to let some script run on you code first to
spot that mixture. IMHO that is a rule that should go in the
code rules of your project and the build process should break
if this mixture if found. Don't let that code reach the sync
repository. As I said I'm maybe failing to see some case.

Formatting is like food, everyone has it's own taste. One has
to use spicery to change it (if possible). For me the view of
the code (the layout) by the programmer should be automatically
changed by the tool that reads the code. Here you could have
a python with braces if you want... (I thing that 'go' has some
autoformater or a standard way of formatting).

-- francis

More information about the Python-Dev mailing list