matejcik is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
matejcik @matejcik

Today I Learned
in Python, `import a.b` will place a `b` attribute on `a` ... in effect inserting a global variable into `a/__init__.py`

that's moderately surprising

· Web · 0 · 1

...it also turns out to be important in a low-memory environment (with micropython), because it makes it more difficult to unimport a module. sys.modules is not the only place that holds a reference