4 ms·
In Python 2 you can redefine the True and False “constants”, which is pretty WAT-y though admittedly tampering. > True = False > if not True: print “can’t
by aaronharnly 4y ago
In Python 2 you can redefine the True and False “constants”, which is pretty WAT-y though admittedly tampering.
> True = False
> if not True: print “can’t happen”
can’t happen
- eyelidlessness 4y agoAnd here I was thinking it’s hilarious that JS `undefined` is assignable! I’m sure there’s good historical reason for this, but being able to change booleans to mean their opposite is something extra special to me
- klodolph 4y agoI think the only reason is because it is not specifically prohibited.
- eyelidlessness 4y agoHeh I think that’s the reason for JS undefined too
- runarberg 4y agoThere are quite a few assignable keywords in modern JavaScript. This is actually cromulent JavaScript: of = "wat"; for (of of of) of