[issue26577] inspect.getclosurevars returns incorrect variable when using class member with the same name as other variable

2021-12-18 Thread Ryan Fox
Ryan Fox added the comment: If you change the class member 'x' to a different name like 'y', then cv doesn't include 'x', but does include an unbound 'y'. In both cases, the function isn't referring to a global variable, just the class me

[issue26577] inspect.getclosurevars returns incorrect variable when using class member with the same name as other variable

2016-03-19 Thread Ryan Fox
New submission from Ryan Fox: If a variable 'x' exists in the global or local scope, and a function (also defined in the same scope as 'x', or lower) refers only to a member named 'x' of an object, inspect.getclosurevars will include a reference to the variable,