Jacek Kołodziej added the comment: > Nice work with the check__all__() function.
Thank you! :) > I left some comments on Reitveld. Also, it currently ignores items satisfying > either of these checks: > > * isinstance(module_object, types.ModuleType) > * getattr(module_object, '__module__', None) not in name_of_module > > The first is largely redundant with the second, because module objects don’t > have a __module__ attribute. However I wonder if it would be better to drop > the second check and just rely on the ModuleType check, making the test > stricter. Or would this be too annoying in some cases (requiring a huge > blacklist)? If so, maybe make the name_of_module checking optional. Could you please elaborate on "making the test stricter"? I'd go with the first check + optional name_of_module. With second one alone, all freshly added test__all__ tests would need additional names in blacklists - not huge ones, but they would otherwise be unnecessary. I've amended the patches and I'm waiting for review. I've also thought of not only making name_of_module param optional, but to make it extra_names_of_module (so such param would be added to module.__name__ used in "getattr(module_object, '__module__', None) in name of module" check. It would account for less typing in general (module.__name__ occurs in almost all cases), but also less explicity. What do you think? ---------- Added file: http://bugs.python.org/file39809/Issue23883_all.v3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23883> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com