summaryrefslogtreecommitdiffstats
path: root/Tools/idle/boolcheck.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/idle/boolcheck.py')
-rw-r--r--Tools/idle/boolcheck.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tools/idle/boolcheck.py b/Tools/idle/boolcheck.py
new file mode 100644
index 0000000..f682232
--- /dev/null
+++ b/Tools/idle/boolcheck.py
@@ -0,0 +1,9 @@
+"boolcheck - import this module to ensure True, False, bool() builtins exist."
+try:
+ True
+except NameError:
+ import __builtin__
+ __builtin__.True = 1
+ __builtin__.False = 0
+ from operator import truth
+ __builtin__.bool = truth