On Sat, 4 Dec 1999, Fredrik Lundh wrote: > M.-A. Lemburg <mal@lemburg.com> wrote: >... > > Because importing in Python has become *much* more > > complicated over time. There are requests for new > > features which touch subjects such as storage mechanisms, > > lookups, signatures (for trusted code), lazy imports, etc. > > sorry, I still don't understand it. our applications already > use different storage mechanisms, databases, signatures, > lazy importing, version handling, etc, etc. now, if *we* > have managed to build all that on top of an old version > of imputil.py, how come it's not sufficient for the rest > of you? I agree. The imputil mechanism has been proven in combat to work for many scenarios. I have not (yet) heard of a case where the model has proven insufficient. > > A chain of simple minded importers won't work together > > too well > > why? it sure works for us... Exactly. "Why?" Please provide an example. >... > > and downgrade performance considerably due to the > > many recursive function calls > > now that's what I call premature optimization. and this > scares the hell out of me: if the rest of the python-dev > crowd don't seriously believe that Python is (or can be > made) fast enough to implement things like this, why > the heck are you using Python at all? am I the only > one here who doesn't believe in osterhout's talk about > "the great system vs. scripting language divide"? Don't worry Fredrik... I'm with you on this one. I do not believe there is a problem with the speed. Nobody has yet profiled imputil to find out where/how the time is being spent. Nobody has tried to speed it up. Therefore, any claims about its performance are simply FUD. I claim that its interface is correct, and you (Fredrik) stated it well: "given a name, please give me a module if you can (otherwise None)." Underneath that semantic, there are a lot of things that can be done to alter the performance and organization. Claims about speed are entirely premature. Yes, I'm biased. But, in truth, I haven't seen a better mechanism yet. I've tossed out a few ideas on how imputil could be improved (which are solely based on guess, rather than empirical evidence of profiling output). When those changes are completed and there is still an issue, then I'll admit defeat and wait for somebody else to provide a new design. Cheers, -g -- Greg Stein, http://www.lyra.org/
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