Fixing boolean literals in Python