public/private context managers for module attributes
One of the issues with defining module attributes via
public(SEVEN=7)
public(a_bar=Bar())
is that it causes linters, such as flake8, to throw errors when those definitions are used later in the module. For example:
One way to achieve the above without causing linter to fail would be to implement public and private as context managers. For example, the above could be implemented as a context manager as follows:
with public:
SEVEN=7
a_bar=Bar()
which we can now see also doesn't throw an linting error in the other example:
Anyway, just a suggestion that might make the package useful more broadly
Edited by Sam Morley-Short

