On Sat, 28 Apr 2007 15:36:19 +0200, Szabolcs wrote: >>>>> True = 2 # DON'T DO THIS!!! >>>>> 2 == True >> True >> > > But shouldn't Python forbid this? Is it possible to get a warning when > unintentionally redefining built-in thing?
Python forbids very few things in comparison to other languages. The attitude is "We're all adults here". Because Python is such a dynamic language, it is often hard for the compiler to tell the difference between something you are doing deliberately and a mistake. If you're worried about that, google for PyChecker. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list