4 ms·
> Black would sometimes change its mind about its own formatting and a second pass would cause a different formatting than the first Why not? I mean, I never b
by uryga 8y ago
> Black would sometimes change its mind about its own formatting and a second pass would cause a different formatting than the first
Why not? I mean, I never built a formatter so idk about the complexity involved, but to me it seems that if Black had a rule like "if you see `a+b` (no spaces), just leave it alone", applying the rule twice shouldn't change anything.
(though I imagine that the interactions of such rules could become hard to understand...)
- zestyping 8y agoThe whole idea is to _prevent_ people from thinking about formatting, by actually making it impossible to make any formatting decisions. There's exactly one way to format the program and that's it. It's draconian, but that's what's great about it.
- uryga 8y agoThat's the feeling I got from the readme, but GP sounds like this particular decision was made not so much for 'philosophical' reasons, as because Black-ing a file twice might give different results. I was curious why :)