Message317062
OK, OK, I think I finally understand what you mean here. Let me try to repeat it just to make sure I really understand:
When requesting a member of a multi-file module (like "func" in my example), python only tries to load that member as a module from disk if there isn't something already created as part of __init__.py.
In my case, I'm trying to load "func.func" which I specifically created in line#1 of func/__init__.py, so Python sees no need to even try to load the func/func.py file.
If I comment-out the first line of func/__init__.py, then Python fails to find an item called "func.func" and so it tries to load one from disk which causes it to load "func/func.py".
My real problem here was that I shouldn't be creating entries in the "func" namespace that clash with on-disk sub-modules that I want loaded.
Thanks for your time and effort in explaining this. |
|
Date |
User |
Action |
Args |
2018-05-18 22:11:53 | Rolf Campbell | set | recipients:
+ Rolf Campbell, brett.cannon, ncoghlan, r.david.murray, eric.snow |
2018-05-18 22:11:53 | Rolf Campbell | set | messageid: <1526681513.72.0.682650639539.issue33547@psf.upfronthosting.co.za> |
2018-05-18 22:11:53 | Rolf Campbell | link | issue33547 messages |
2018-05-18 22:11:53 | Rolf Campbell | create | |
|