1
Vote

Instances of classes from other user modules are not cleared

description

Given the following code, the types of x, y and z are all determined correctly. However, when the three assignments are commented out, x retains its type (T instance) while the others become unknown.

Expected: x should be of unknown type after removing the assignment.
import package1
x = package1.T()
x

class T2(object): pass
y = T2()
y

import abc
z = abc.WeakSet()
z

comments