Ryan Fox <foxr...@gmail.com> 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 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 <rep...@bugs.python.org> wrote:

>
> hongweipeng <hongweichen8...@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 <rep...@bugs.python.org>
> <https://bugs.python.org/issue26577>
> _______________________________________
>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue26577>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to