bpo-15999: Clean up of handling boolean arguments. by serhiy-storchaka · Pull Request #15610 · python/cpython (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

serhiy-storchaka

https://bugs.python.org/issue15999

@serhiy-storchaka

@serhiy-storchaka

sir-sigurd

@@ -130,7 +130,7 @@ def __init__(self):
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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that's OK.

https://docs.python.org/3.9/library/functions.html#compile

The argument optimize specifies the optimization level of the compiler; the default value of -1 selects the optimization level of the interpreter as given by -O options. Explicit levels are 0 (no optimization; debug is true), 1 (asserts are removed, debug is false) or 2 (docstrings are removed too).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is dont_inherit, not optimize.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry.

@serhiy-storchaka

lisroach pushed a commit to lisroach/cpython that referenced this pull request

Sep 10, 2019

@serhiy-storchaka @lisroach

DinoV pushed a commit to DinoV/cpython that referenced this pull request

Jan 14, 2020

@serhiy-storchaka @DinoV

websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request

Jul 20, 2020

@serhiy-storchaka @websurfer5

Reviewers

@sir-sigurd sir-sigurd sir-sigurd left review comments

@rhettinger rhettinger Awaiting requested review from rhettinger

@1st1 1st1 Awaiting requested review from 1st1

@abalkin abalkin Awaiting requested review from abalkin

@asvetlov asvetlov Awaiting requested review from asvetlov

@pganssle pganssle Awaiting requested review from pganssle

@tiran tiran Awaiting requested review from tiran