mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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.
This commit is contained in:
parent
5eca7f3f38
commit
1f21eaa15e
21 changed files with 69 additions and 78 deletions
|
@ -1326,7 +1326,7 @@ class DocTestRunner:
|
|||
try:
|
||||
# Don't blink! This is where the user's code gets run.
|
||||
exec(compile(example.source, filename, "single",
|
||||
compileflags, 1), test.globs)
|
||||
compileflags, True), test.globs)
|
||||
self.debugger.set_continue() # ==== Example Finished ====
|
||||
exception = None
|
||||
except KeyboardInterrupt:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue