The Picard Maneuver@lemmy.worldM to memes@lemmy.world · 5 days agoDon't do itlemmy.worldimagemessage-square14fedilinkarrow-up113arrow-down11
arrow-up112arrow-down1imageDon't do itlemmy.worldThe Picard Maneuver@lemmy.worldM to memes@lemmy.world · 5 days agomessage-square14fedilink
minus-squareZiglin (it/they)@lemmy.worldlinkfedilinkEnglisharrow-up0·5 days agoWhy does not without a parameter return True? I’m starting to like the fact that I haven’t touched python in a while.
minus-squareLostXOR@fedia.iolinkfedilinkarrow-up1·5 days agoI think it’s because not() is equivalent to not(None), and since None is falsy not(None) returns True.
Why does not without a parameter return True? I’m starting to like the fact that I haven’t touched python in a while.
I think it’s because
not()
is equivalent tonot(None)
, and sinceNone
is falsynot(None)
returnsTrue
.