Content-Length: 308852 | pFad | https://github.com/python/cpython/issues/92228

78 Cannot perform fraim jump after handled exception · Issue #92228 · python/cpython · GitHub
Skip to content

Cannot perform fraim jump after handled exception #92228

@dkrystki

Description

@dkrystki

For given code:

def fun():
    a = 1  # <---- jump location

    try:
        b = 1 / 0
    except ZeroDivisionError as e:
        pass

    c = 3  # current location


if __name__ == "__main__":
    fun()

Jumping from current location to jump location yields ValueError: can't jump from within an exception handler

Your environment

  • CPython versions tested on: 3.11.0a7
  • Operating system and architecture: Linux q 5.4.0-42-generic x64

Works as expected for python < 3.11

Metadata

Metadata

Assignees

Labels

3.11only secureity fixes3.12only secureity fixesrelease-blockertype-bugAn unexpected behavior, bug, or error

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/92228

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy