Imagine I have a python package called foo, inside are many modules bar1, bar2...
I can access its functions after calling
import foo
and then with
foo.bar1.some_function()
Now there are a few functions that are general for the whole package foo. I would like to access it as module foo, that I can call its functions with
foo.some_often_used_function()
but then foo would be a module and not a package, it can't be both at the same time.
Is there some workaround to enable this syntax? Using python 3.11