Opened 4 years ago

Closed 4 years ago

#533 closed defect (fixed)

reference leak when 'continue' appear in a loop's 'else' branch

Reported by: scoder Owned by: scoder
Priority: major Milestone: 0.13
Component: Code Generation Keywords:
Cc:

Description

The following leaks references to 'L' when executing the 'continue' statement:

def for_in():
    """
    >>> for_in()
    6
    """
    i = -1
    for L in [[], range(5), range(10)]:
        for i in L:
            if i > 5:
                break
        else:
            continue
        break
    return i

Change History (2)

comment:1 Changed 4 years ago by scoder

  • Owner changed from somebody to scoder
  • Status changed from new to assigned

comment:2 Changed 4 years ago by scoder

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.