Black
Rhodri James
rhodri at kynesim.co.uk
Mon Oct 21 10:47:28 EDT 2019
On 21/10/2019 15:18, lizhollinshead5 at gmail.com wrote:
> What do people think about black?
It's the new orange?
Seriously, some context would be good. I take it from a quick Google
that black is a Python code formatter that makes some frankly rather
dubious claims for what it will do to your coding.
> I'm asking because one of my personal preferences is to use spaces for clarity:
If your personal preference is not the same as black's, it looks like
you shouldn't use black. Just asking the question indicates that you
are intending to fight with it, and that's bound to be a waste of energy.
>
> 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?
All I can offer is my personal opinion that brackets of all sorts are
their own spacing, and additional spaces reduce clarity rather than
increase it. On the other hand I do put extra spaces around everything
other than ":" and ".". But like I said, that's my personal preference.
(Which indicates that I too shouldn't consider using black!)
--
Rhodri James *-* Kynesim Ltd
More information about the Python-list
mailing list