PyWart: "Python's import statement and the history of external dependencies"

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Nov 23 02:00:29 CET 2014


Tim Chase wrote:

> On 2014-11-22 23:25, Steven D'Aprano wrote:

>> > And after all that, it would still fail if you happened to want to
>> > import both "calendar" modules into the same module.
>> 
>> __path__ = []
>> import calendar
>> __path__ = ['my/python/modules']
>> import calendar as mycalendar
> 
> Hrm.  Never knew this.  Could you point me at some docs on that?
> (searching for "__path__" on python.org isn't turning up much that
> jumps out at me as being correlated)


You've misunderstood what I said, I was proposing it as a hypothetical
feature, not something existing. Sorry for any confusion.


-- 
Steven




More information about the Python-list mailing list