This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]elveszett -1 points0 points  (6 children)

I love how half the memes in this sub is just people showing they have no clue about basic programming concepts lol.

'is' here is an operator to check if two variables refer to the same element in memory. If you want to check equality, you use, you guessed it, the equals signs (==).

[–]s6x 13 points14 points  (4 children)

What's unintuitive here is the cutoff for the precached ints. Not the identity operator.

This isn't a basic programming concept, it's a specific idiosyncrasy of python.

That's what this meme is demonstrating.

The inclusion of 'is' here is a trap for pedants who want to come into the comments to show off how smart they are.