News for hackers. Stuff that matters.
Re:YAPF – A formatter for Python files by jdnier on Friday April 03, 2015 @01:17AM (#9314483)
I think of it as indicating the function name and parameter list are a unit (it's foo(object), not foo (object)). I've always liked that style.

When I see people write

    'some %s %s text ' %('x', 'y')
my first thought is "% is not not a function".

I'm reminded also of (and agree with) the Crockford convention in JavaScript recommending a space in

    function () {...}
but not in

    function foo(object) {...}
But conventions are are a choice made; most times it's easier to adopt them and move on.
Re:YAPF – A formatter for Python files by alok-g on Friday April 03, 2015 @02:00AM (#9314565)
>> But conventions are are a choice made; most times it's easier to adopt them and move on.

Which brings me to a related question. Just like color-schemes are preferences in editors and IDEs, why isn't such spacing too. Then it would not be a "choice made" a priori for all individuals.

Re:YAPF – A formatter for Python files by zo1 on Friday April 03, 2015 @04:50AM (#9314953)
Because colors can be altered in any end-reader's IDE/text editor. Indentation and spacing, however, can not. At least, not safely yet.

I suppose you could run all the code you receive and have to read through a code-formatter such as YAPF. That way, no matter what "way" someone writes their code, when you read it, it'll be in your comfortable/preferred format.

Re:YAPF – A formatter for Python files by alexhill on Friday April 03, 2015 @03:22AM (#9314727)
Colour schemes aren't part of the text itself. However, if your IDE could automatically display your code formatted as you like while keeping the underlying text file aligned with some convention, and make that not a nightmare while editing...well, I think you're onto something there.