Jean-Paul Calderone invalid@example.invalid added the comment:
Since the main argument for not fixing this bug seems to be that it doesn't
affect many users, it seems like I should comment here that the issue is
affecting me. A recently proposed addition to Twisted gets bitten by this
case,
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +ericsnow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2506
___
___
Python-bugs-list
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2506
___
___
Python-bugs-list
Terry J. Reedy [EMAIL PROTECTED] added the comment:
While I agree with Raymond that the interpreter should be left alone,
this could be reclassified (and reopened) as a doc issue. The current
trace doc (Lib Ref 25.10) says rather tersely The trace module allows
you to trace program execution,
Ned Batchelder [EMAIL PROTECTED] added the comment:
It's hard for me to agree with your assessment that for no practical
good would come from disabling the optimizer. Broadly speaking, there
are two types of code execution: the vast majority of the time, you
execute the code so that it can do
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
On Sat, Mar 29, 2008 at 4:58 PM, Raymond Hettinger
[EMAIL PROTECTED] wrote:
This has basically almost never been a problem in the real world.
I believe Ned gave an important use case. In coverage testing,
optimized runs can show
Raymond Hettinger [EMAIL PROTECTED] added the comment:
Weigh the cost/benefit carefully before pushing further. I don't doubt
the legitimacy of the use case, but do think it affects far fewer than
one percent of Python programmers. In contrast, introducing new
command line options is a big
Ned Batchelder [EMAIL PROTECTED] added the comment:
Raymond, do you have a cannon-less recommendation of how to kill this
particular mosquito?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2506
__
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
On Sun, Mar 30, 2008 at 5:01 PM, Raymond Hettinger
[EMAIL PROTECTED] wrote:
..
It would be *much* more useful to direct effort improving the mis-
reporting of the number of arguments given versus those required for
instance methods:
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
On Sun, Mar 30, 2008 at 5:01 PM, Raymond Hettinger
[EMAIL PROTECTED] wrote:
..
Weigh the cost/benefit carefully before pushing further. I don't doubt
the legitimacy of the use case, but do think it affects far fewer than
one
Raymond Hettinger [EMAIL PROTECTED] added the comment:
Marking this one as closed.
Also, rejecting the various ways to disable peephole optimization.
This was discussed with Guido long ago and the decision essentially
recognized that for most practical purposes the output of the peepholer
New submission from Ned Batchelder [EMAIL PROTECTED]:
When tracing line execution with sys.settrace, a particular code
structure fails to report an executed line. The line is a continue
statement after an if condition in which the if condition is true every
time it is executed.
Attached is a
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
This is because of a peephole optimization of the generated bytecode:
a jump instruction which target is another jump instruction can be
modified modified to target the final location.
You gain a few opcodes, but tracing is confusing...
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
I think this is not a bug. Here is a simpler way to illustrate the
issue:
def f(x):
for i in range(10):
if x:
pass
continue
f(True)
f(False)
If you run the code above under trace, you get the
Ned Batchelder [EMAIL PROTECTED] added the comment:
I see that the cause of the problem is the peephole optimizer. That
doesn't mean this isn't a problem.
I am measuring the code coverage of a set of tests, and one of my lines
is being marked as not executed. This is not the fault of the
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
On Sat, Mar 29, 2008 at 2:51 PM, Ned Batchelder [EMAIL PROTECTED] wrote:
Ned Batchelder [EMAIL PROTECTED] added the comment:
I am measuring the code coverage of a set of tests, and one of my lines
is being marked as not executed.
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
Unfortunately -O0 will be confusingly similar to -OO.
On my browser, both are shown identically at the pixel level.
Microsoft compilers use -Od to disable optimization...
__
Tracker [EMAIL PROTECTED]
Raymond Hettinger [EMAIL PROTECTED] added the comment:
This has basically almost never been a problem in the real world. No
need to complicate the world further by adding yet another option and
the accompanying implementation-specific knowledge of why you would
ever want to use it.
Also,
Ned Batchelder [EMAIL PROTECTED] added the comment:
I recognize that this is an unusual case, but it did come up in the real
world. I found this while measuring test coverage, and the continue
line was marked as not executed, when it was.
I don't understand when the peepholer is moved, so
Changes by ajaksu [EMAIL PROTECTED]:
--
nosy: +ajaksu2
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2506
__
___
Python-bugs-list mailing list
Unsubscribe:
20 matches
Mail list logo