On Tue, 2003-12-16 at 13:26, Guido van Rossum wrote: > A lot people have presented a good case for relative imports. Nobody > has argued to keep the status quo (where imports are ambiguous about > whether they are meant to be absolute or relative). So I suggest that > in 2.4, we introduce the leading dot notation for relative import, > while still allowing relative import without a leading dot. In > 2.5 we can start warning about relative import without a leading dot > (although that will undoubtedly get complaints from folks who have > code that needs to work with 2.3 still). In 3.0 we can retire > ambiguous import. I'll just note that where the current status quo trips /me/ up most is when I accidentally have a local module with the same name as a global module, and then I write an import statement expecting to get the standard library module, but end up getting the local module. That's why when I tend to think about this, I start wanting a way to spell "definitely give me the global one, no matter what". IOW, I feel like I want a way to bypass relative module lookups. I'm still catching up on this thread, but I wanted to throw this out there... -Barry
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4