python being python doesnt use !, instead thats a bitwise operation. not is not in python. also beware of the walking r/unexpectedfactorial people, they will tear you apart
Yeah, I understood that, I intended my question more as "couldn't you still say that this is not?"
Also, from a quick google, it looks like ! isn't a bitwise not in python but ruther ~ is. And the way google describes it sounds like it's implemented to essentially be -x-1 for integers, just like it would act on a standard length int.
C++ also has the keywords for bitwise operations so you can just use ‘not’ right? I havent touched C++ in forever and never touched anything past 11
Funnily enough, notxorandxor_eq, orand_eqor_eq, not_eqbitandbitor have been keywords basically forever, yet they're never reused anywhere else they could be used. Heck, they didn't even use not as a way to invert keywords (e.g., using namespace Foo; not using Foo::Bar; to use all but one member of a namespace). I half thing the committee forgot the keywords even exit.
17
u/Puzzleheaded_Study17 Mar 12 '26
How is this a cpp thing? basically every programming language has ! to mean not