Message144432
> A separate issue would be a feature request to not do that (assuming it really does).
I tried to verify this (the fact that modules get imported with help('modules')). Here are the results:
* Lib/foobar.py:
- help('modules'): foobar in the list, code is *not* executed;
- help('foobar'): code is executed;
* Lib/deleteme/__init__.py:
- help('modules'): deleteme in the list, code is executed;
- help('deleteme'): code is executed;
* Lib/deleteme/__init__.py and Lib/deleteme/foobar.py:
- help('modules'): deleteme in the list, only __init__ code is executed;
- help('deleteme.foobar'): foobar code is executed;
So it seems the only code that gets executed with help('modules') is the one in packages' __init__s. It also seems that the code is executed only once, so doing help('deleteme') after help('modules') doesn't execute the code again. |
|
Date |
User |
Action |
Args |
2011-09-22 23:40:15 | ezio.melotti | set | recipients:
+ ezio.melotti, rhettinger, terry.reedy, eric.araujo, docs@python, dronus |
2011-09-22 23:40:14 | ezio.melotti | set | messageid: <1316734814.9.0.254846330826.issue12902@psf.upfronthosting.co.za> |
2011-09-22 23:40:14 | ezio.melotti | link | issue12902 messages |
2011-09-22 23:40:14 | ezio.melotti | create | |
|