I really wish I'd been paying more attention to 328, which I've just read. This proposal seems to break lots and lots and lots of existing code. Maybe I'm reading it wrong. I've written many, many packages that use the form import foo where "foo" is a sibling module in the package. Or from foo import bar where, again, foo is a sibling to the current module. Packages that work like this have been submitted to on-line libraries, printed in books, etc., etc., etc. I really hope I'm reading the PEP wrong! Am I correct in thinking that come Python 2.4 or 2.5, these will just break if the package isn't at the top level (reachable from sys.path)? I was thinking (some months ago) that y'all would come up with an absolute form instead, something like from / import os or import /os or import /email.Message and a relative form like from foo import bar to do fuzzy and imperfect matching of the module (what we have now), or from ./foo import bar to do more explicit matching of siblings, or from ../baz.foo import bar or from -/baz.foo import bar to go up a level. And that the fuzzy and imperfect form would be eventually deprecated, but never removed. Bill
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