Message287049
Instead of:
__all__ = [name for name in globals() if not name.startswith('_') and name not in {'enum', 're', 'sys', 'wantobjects'}]
Maybe this would be less fragile:
import types
__all__ = [name for name, obj in globals().items() if not name.startswith('_') and not isinstance(obj, types.ModuleType) and name not in {'wantobjects'}]
That is, exclude all modules. Admittedly, I had to import types, but there are other ways to do this test without that import. |
|
Date |
User |
Action |
Args |
2017-02-05 15:35:45 | eric.smith | set | recipients:
+ eric.smith, terry.reedy, ethan.furman, serhiy.storchaka |
2017-02-05 15:35:45 | eric.smith | set | messageid: <1486308945.78.0.976579569924.issue29446@psf.upfronthosting.co.za> |
2017-02-05 15:35:45 | eric.smith | link | issue29446 messages |
2017-02-05 15:35:45 | eric.smith | create | |
|