However for the first time, I don't agree with you when you say, we should compare None using "==". I have always read code using "is" and I'm sure many linters will stop you with this syntax.
The thing about using is for checking equality is that linters actively encourage it. I forget if it is Pylance or Ruff, but one of the linters I use day-to-day Will give me a linter error if I use == to check for None, and tell me to use is
Excellent article as always.
However for the first time, I don't agree with you when you say, we should compare None using "==". I have always read code using "is" and I'm sure many linters will stop you with this syntax.
I'm a backend dev who has an aversion to trying to learn pandas and other data tools. I would love to see a tutorial on that since you make them fun.
Thanks. I knew those. But it's still good to have them quite present in your mind and it also feels good to know something at all that is not obvious.
Btw: Did you mean "trailing comma" here:
"But a leading parenthesis can create a tuple of one element:"
Best!
Christian
The thing about using is for checking equality is that linters actively encourage it. I forget if it is Pylance or Ruff, but one of the linters I use day-to-day Will give me a linter error if I use == to check for None, and tell me to use is