Assignment-Operator
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 rule id: assignment-operator
Section titled “Sourcery rule id: assignment-operator”Description
Section titled “Description”Replace assignment with assignment operator
Before
Section titled “Before”x = x + 1x += 1Explanation
Section titled “Explanation”The augmented assignment operators, such as += are a more streamlined and easy to understand way
to add values. Using them removes a little bit of repetition and makes the code slightly easier to
understand.