Eric V. Smith added the comment: 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. ---------- nosy: +eric.smith _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29446> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com