Binary Operator Identity
Documentation Index
Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sourcery refactoring id: bin-op-identity
Section titled “Sourcery refactoring id: bin-op-identity”Description:
Section titled “Description:”Replaces binary operations between a value and itself with known identities:
Changes:
Section titled “Changes:”x | x=>xx & x=>xx ^ x=>0x - x=>0x / x=>1x // x=>1x % x=>0
Explanation:
Section titled “Explanation:”These changes simplify the code, making it easier to understand what is going on.