606
Sus (sh.itjust.works)
you are viewing a single comment's thread
view the rest of the comments
[-] sjmarf@sh.itjust.works 102 points 3 months ago* (last edited 3 months ago)

not() is a base function that negates what’s inside (turning True to False and vice versa) giving it no parameter returns “True” (because no parameter counts as False)

Actually, not is an operator. It makes more sense if you write not() as not () - the () is an empty tuple. An empty tuple is falsy in Python, so not () evaluates to True.

this post was submitted on 14 Sep 2024
606 points (98.7% liked)

Programmer Humor

19813 readers
205 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS