git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Black


Top posting?


Agreed. As my eyes age (they're even older than my teeth!) I find the 
additional horizontal white space improves (my) comprehension, 
particularly when dealing with a dense nesting of structures.

Of course the more 'across' the text stretches, the more likely a 
vertical expansion will also result.

Some folk dislike the spaces, and claim the opposite effect. 
Strangely-enough, when I linked their coding views to their clothing 
choices (gaps, over-laps, ...) then it became a matter of 'personal 
freedom' and a cant that others/employers should not confuse outward 
appearance with (inner) competence.

Then again, notice my (optional) parentheses here, and how there's no 
spaces 'inside' them - which do appear in my Python. Inconsistency is a 
human condition. We are not machines.


A tool is something which will make one's life easier, but harmony 
within a team is an intangible value and much under-rated - until 
experienced!


On 22/10/19 3:49 AM, Paul Moore wrote:
> IMO, if you care enough to not like black's formatting choices, you
> probably shouldn't use it. The point of black is to *not* care about
> formatting, but leave the decisions to the tool. If you're not doing
> that, then it's probably the wrong tool for you. There may be other
> code formatters that are more configurable - I honestly don't know -
> and which therefore may be more useful to you once configured to your
> liking. But black is (as I understand it) about *not* worrying about
> formatting choices, so you can get on to other more important
> decisions.
> 
> Personally, I don't really like some of black's choices. So I only use
> it on projects where I'm tired of worrying about formatting and
> readability and just want something that's OK. Over time, I'm finding
> that's true of more and more of my projects :-)
> 
> Regarding your question on spaces, I like some of your spacing
> choices, but not all of them. So we could have a debate over precisely
> which spaces I agree with and which I don't. But I'm not really
> interested in doing that. Black would probably help if we had to work
> together, but unless we do, you can do what you want and I won't mind
> :-)
> 
> Paul
> 
> On Mon, 21 Oct 2019 at 15:22, <lizhollinshead5 at gmail.com> wrote:
>>
>> What do people think about black?
>>
>> I'm asking because one of my personal preferences is to use spaces for clarity:
>>
>> 1.  right = mystr[ start : ]
>>
>>           black version     right=mystr[start:]
>>
>> 2.  mtime = time.asctime( time.localtime( info.st_mtime ) )
>>
>>           black version     mtime = time.asctime(time.localtime(info.st_mtime))
>>
>> Is there a reason why PEP8 doesn't like these spaces?
>> --
>> https://mail.python.org/mailman/listinfo/python-list

-- 
Regards =dn