bpo-15999: Clean up of handling boolean arguments. (GH-15610)
* Use the 'p' format unit instead of manually called PyObject_IsTrue().
* Pass boolean value instead 0/1 integers to functions that needs boolean.
* Convert some arguments to boolean only once.
diff --git a/Lib/codeop.py b/Lib/codeop.py
index fb759da..e5c7ade 100644
--- a/Lib/codeop.py
+++ b/Lib/codeop.py
@@ -130,7 +130,7 @@
self.flags = PyCF_DONT_IMPLY_DEDENT
def __call__(self, source, filename, symbol):
- codeob = compile(source, filename, symbol, self.flags, 1)
+ codeob = compile(source, filename, symbol, self.flags, True)
for feature in _features:
if codeob.co_flags & feature.compiler_flag:
self.flags |= feature.compiler_flag