Discussion about this post

User's avatar
Ranudar's avatar

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

Expand full comment
Ash Roberts's avatar

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

Expand full comment
8 more comments...

No posts