• Benjamin Peterson's avatar
    normalize exceptions passed to the __exit__ method #7853 · 565d7858
    Benjamin Peterson yazdı
    In Python 2.x, exceptions in finally blocks are not normalized.  Since with
    statements are implemented using finally blocks, ceval.c had to be tweaked to
    distinguish between with finally blocks and normal ones.
    
    A test for the finalization of generators containing with statements was also
    added.
    565d7858
test_with.py 25.8 KB