Mark Shannon <m...@hotpy.org> added the comment:

Let me give you an example.

#module eggs

eggs_var = 0 # a variable, maybe a counter or similar
EGGS_CONST # a constant

#module spam

import eggs

spam_var # Another variable

def foo():
    use(eggs.EGGS_CONST)

-------------

We will want to treat `eggs.EGGS_CONST` as a constant.
To do that we need to be notified if `spam.eggs` or `eggs.EGGS_CONST` changes, 
but we do not want be notified whenever `spam.spam_var` or `eggs.eggs_var` 
changes.

This might not be necessary for us right now, but we will want to implement 
optimizations over larger regions than a single bytecode in 3.12.

----------

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

Reply via email to