You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
1How do you know it takes precedence? – I couldn't find it in the Python documentationqff– qff2017年01月10日 21:56:05 +00:00Commented Jan 10, 2017 at 21:56
-
@qff I tested it. I also tested python3 just now and it has the same behavior. A link to official documentation of the fact would be good. If you find one, please feel free to edit my answer or post a comment and I'll edit it.kanaka– kanaka2017年01月10日 22:14:31 +00:00Commented Jan 10, 2017 at 22:14
-
1Found it! (kind of) – the entries of a directory are sorted before trying to load each one as either a package or module. This ensures packages are loaded first. Link to CPython source codeqff– qff2017年01月10日 22:58:20 +00:00Commented Jan 10, 2017 at 22:58
lang-py