=- and -= snag

Thomas Passin list1 at tompassin.net
Mon Mar 13 21:37:27 EDT 2023


On 3/13/2023 9:07 PM, Chris Angelico wrote:
> Of course, all this is predicated on you actually putting whitespace
> around your equals signs. If you write it all crunched together as
> "x=-5", there's no extra clues to work with.
> 
> Linters and code reviewers can make use of all the available
> information, including whitespace, to determine programmer intent.

This is the kind of thing that unit tests can catch.



More information about the Python-list mailing list