Lazy Load a Variable
mlucool opened this issue · comments
Similar to lazy loading magics, we'd find it useful if we could lazy load variables. That is, users want to do something like as soon as they start IPython (no imports/code needed):
o.fn1().fn2()
Here they know what o
means to them and they use it all the time and know it means:
from foo import Bar
from baz import qux
o = Bar(qux)
So ideally in IPython startup they can define variable -> imports + code to be evaluated the first time they try to access this global.
Would you expect foo, Bar, baz and qux to be in final namespace ?
Would you expect foo, Bar, baz and qux to be in final namespace ?
No
Closed by deshaw/pyflyby#345