[SciPy-user] Re: [SciPy-dev] MCMC, Kalman Filtering, AI for SciPy?

Fernando Perez Fernando.Perez at colorado.edu
Tue Sep 28 14:15:51 CDT 2004

Travis Oliphant schrieb:

> This is the delayed import mechanism again (not info).   The fancyness 
> hurts some tools that rely on introspection.  I'm not sure if the 
> problem can be resolved as I very much want the delayed import 
> functionality.

I realize that the delayed import functionality is pretty critical, but I 
think that breaking help() is kind of bad :)  Unfortunately I know that the 
delayed import system plays a lot of fancy tricks to get things done, and I 
don't know the code well enough to offer a fix myself.

But hopefully this can be fixed at some point, I'm willing to believe it's 
possible to somehow work things out.  One option might be for scipy, upon 
import, to inject its own help() wrapper into __builtins__.  This wrapper 
could then detect whether it's being called with a string, in which case it 
could try to avoid the delayed import things which break the normal help() 
calls, or if it's called with an object name, case in which throwing a 
NameError for undefined things is OK.  I know this is only a hand-wavy sketch, 
but I just am not quite willing to swallow that a solution is 'impossible', 
knowing the flexibility of python.  But since I can't really offer code right 
now, I won't complain either ;)



More information about the SciPy-user mailing list