[New-bugs-announce] [issue17288] cannot jump from a return after setting f_lineno

Xavier de Gaye report at bugs.python.org
Sun Feb 24 18:26:53 CET 2013


New submission from Xavier de Gaye:

On python 3.3 and the default branch, the jump from a 'return' fails although
the change to f_lineno is validated, see below.

This problem does not occur with python 2.7.

$ python return.py
> /tmp/return.py(8)<module>()
-> foo()
(Pdb) break 5
Breakpoint 1 at /tmp/return.py:5
(Pdb) continue
> /tmp/return.py(5)foo()
-> lineno = 5
(Pdb) step
--Return--
> /tmp/return.py(5)foo()->None
-> lineno = 5
(Pdb) jump 4
> /tmp/return.py(4)foo()->None
-> lineno = 4
(Pdb) where
  /tmp/return.py(8)<module>()
-> foo()
> /tmp/return.py(4)foo()->None
-> lineno = 4
(Pdb) step
--Return--
> /tmp/return.py(8)<module>()->None
-> foo()
(Pdb)

----------
components: Interpreter Core
files: return.py
messages: 182880
nosy: xdegaye
priority: normal
severity: normal
status: open
title: cannot jump from a return after setting f_lineno
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29223/return.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17288>
_______________________________________


More information about the New-bugs-announce mailing list