
March 1, 2017
10:49 a.m.
On Wed, Mar 1, 2017 at 2:31 AM, Nicolas Cellier <contact@nicolas-cellier.net> wrote:
For example:
lazy import pylab as pl # do nothing for now
# do stuff
def plot(*args): pl.figure() # Will raise an ImportError at this point pl.plot(...)
This can already be achieved without introducing a new keyword by using LazyLoader: https://docs.python.org/3/library/importlib.html#importlib.util.LazyLoader --Berker