logoalt Hacker News

rmunntoday at 1:39 AM0 repliesview on HN

It also helps prevent people from ever redefining them. I mean, if you try to redefine False (in a version of Python that allows it) then you deserve everything that's about to happen to your code... but at the same time, it could possibly lead to a security attack. Redefine False then import some module and get unexpected behavior that you can manipulate to your advantage, somehow. I don't know how that would work, it probably wouldn't... but there's also no reason not to lock those names in and prevent them from ever being redefined.