From 1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0a70 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 1 Sep 2019 12:16:51 +0300 Subject: 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. --- Lib/codeop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/codeop.py') diff --git a/Lib/codeop.py b/Lib/codeop.py index fb759da42a..e5c7adea54 100644 --- a/Lib/codeop.py +++ b/Lib/codeop.py @@ -130,7 +130,7 @@ class Compile: 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 -- cgit v1.2.1