Mercurial > hg-stable
view .clang-format @ 46692:9306a16ca964
debugcommands: prevent using `is False`
I was touching this code in a future patch and marmoute warned about usage of
`is False` here.
Quoting marmoute:
```
"is False" is going to check if the object you have the very same object in
memory than the one Python allocated for False (in practice 0)
This will "mostly work" on cpython because of implementation details, but
is semantically wrong and can start breaking unexpectedly
```
Differential Revision: https://phab.mercurial-scm.org/D10014
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 16 Feb 2021 20:38:14 +0530 |
parents | d0a3fa849cb8 |
children |
line wrap: on
line source
BasedOnStyle: LLVM IndentWidth: 8 UseTab: ForIndentation BreakBeforeBraces: Linux AllowShortIfStatementsOnASingleLine: false IndentCaseLabels: false AllowShortBlocksOnASingleLine: false AllowShortFunctionsOnASingleLine: false IncludeCategories: - Regex: '^<' Priority: 1 - Regex: '^"' Priority: 2