Message408866
| Author |
Ryan Fox |
| Recipients |
Ryan Fox, hongweipeng, iritkatriel, yselivanov |
| Date |
2021年12月18日.20:30:07 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAGqH21LOtw-NeDsfd7D6hOU4Hc9NY5j_TzPO3RSgSQp0dsit=w@mail.gmail.com> |
| In-reply-to |
<1639841656.53.0.581755796553.issue26577@roundup.psfhosted.org> |
| Content |
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>
> _______________________________________
> |
|