On Sunday, January 29, 2017 at 11:29:29 PM UTC-8, Irv Kalb wrote: > It seems very odd that Python allows you to override the values of > True and False.
Hi Irv, Let me join the chorus of people who are encouraging you to switch to Python3, which corrects this problem. Overriding builtins has been judged harmful, and now it is a lot harder to do. There are sometimes good reasons for shadowing builtins, but more than a few newcomers to Python (once upon a time, myself included) wrote buggy code by accident because of this surprising flexibility. That being said, I can't resist re-posting a story from 14 years ago: https://groups.google.com/forum/#!original/comp.lang.python/xEtUYsxLnFE/6yYgvhvkggMJ ============== From: lad...@my-deja.com (John Ladasky) Newsgroups: comp.lang.python Subject: Re: Python 2.3 True = False Date: 24 Mar 2003 12:29:04 -0800 an...@calbay.com (Anand) wrote in message news:<c6303995.0303...@posting.google.com>... > >>> True = False > >>> True > False Shhh! Anand! You're not supposed to show anyone that! Now every politician on Earth will want to program in Python! ============== -- https://mail.python.org/mailman/listinfo/python-list