STINNER Victor <vstin...@python.org> added the comment:
Ronald: > BTW. A list of stdlib module names is not sufficient to determine if a module > is in the stdlib, thanks to .pth files it is possible to have entries on > sys.path before the stdlib. Yeah, I wrote it in my first message. I solved this issue with documentation: "Note: If a third party module has the same name than a standard library module and it comes before the standard library in sys.path, it overrides the standard library module on import." I updated sys.module_names documentation in my PR. IMO it's an acceptable limitation. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42955> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com