Message408866
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 member of that name. Besides the function itself, no other globals
are included in cv.globals.
On Sat, Dec 18, 2021 at 10:34 AM hongweipeng <report@bugs.python.org> wrote:
>
> hongweipeng <hongweichen8888@sina.com> added the comment:
>
> Why is expected that 'x' would not exist in cv.globals? I think it works
> normally, you can see `x` in `func.__globals__`.
>
> ----------
> nosy: +hongweipeng
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue26577>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2021-12-18 20:30:07 | Ryan Fox | set | recipients:
+ Ryan Fox, yselivanov, hongweipeng, iritkatriel |
2021-12-18 20:30:07 | Ryan Fox | link | issue26577 messages |
2021-12-18 20:30:07 | Ryan Fox | create | |
|