import builtins
import operator
import functools

from ..compile import varary


builtins.__dict__.update({
    # Runtime counterparts of some stuff in `Compiler.builtins`.
    '$': lambda f, *xs: f(*xs)
  , ':': lambda f, *xs: f(*xs)
  , ',': lambda a, *xs: (a,) + xs

  , '<':  operator.lt
  , '<=': operator.le
  , '==': operator.eq
  , '!=': operator.ne
  , '>':  operator.gt
  , '>=': operator.ge
  , 'is': operator.is_
  , 'in': lambda a, b: a in b

  , 'not': operator.not_
  , '~':  operator.invert
  , '+':  varary(operator.pos, operator.add)
  , '-':  varary(operator.neg, operator.sub)
  , '*':  operator.mul
  , '**': operator.pow
  , '/':  operator.truediv
  , '//': operator.floordiv
  , '%':  operator.mod
  , '!!': operator.getitem
  , '&':  operator.and_
  , '^':  operator.xor
  , '|':  operator.or_
  , '<<': operator.lshift
  , '>>': operator.rshift

    # Useful stuff.
  , 'import': __import__
  , 'foldl': functools.reduce
  , '~:': functools.partial
})

import builtins
import operator
import functools
import importlib

from ..compile import varary


builtins.__dict__.update({
    # Runtime counterparts of some stuff in `Compiler.builtins`.
    '$': lambda f, *xs: f(*xs)
  , ':': lambda f, *xs: f(*xs)
  , ',': lambda a, *xs: (a,) + xs

  , '<':  operator.lt
  , '<=': operator.le
  , '==': operator.eq
  , '!=': operator.ne
  , '>':  operator.gt
  , '>=': operator.ge
  , 'is': operator.is_
  , 'in': lambda a, b: a in b

  , 'not': operator.not_
  , '~':  operator.invert
  , '+':  varary(operator.pos, operator.add)
  , '-':  varary(operator.neg, operator.sub)
  , '*':  operator.mul
  , '**': operator.pow
  , '/':  operator.truediv
  , '//': operator.floordiv
  , '%':  operator.mod
  , '!!': operator.getitem
  , '&':  operator.and_
  , '^':  operator.xor
  , '|':  operator.or_
  , '<<': operator.lshift
  , '>>': operator.rshift

    # Useful stuff.
  , 'import': importlib.import_module
  , 'foldl': functools.reduce
  , '~:': functools.partial
})

Use importlib.import_module instead of __import__.
Use importlib.import_module instead of __import__.

  import builtins
  import operator
  import functools
+ import importlib
  
  from ..compile import varary
  
  
  builtins.__dict__.update({
      # Runtime counterparts of some stuff in `Compiler.builtins`.
      '$': lambda f, *xs: f(*xs)
    , ':': lambda f, *xs: f(*xs)
    , ',': lambda a, *xs: (a,) + xs
  
    , '<':  operator.lt
    , '<=': operator.le
    , '==': operator.eq
    , '!=': operator.ne
    , '>':  operator.gt
    , '>=': operator.ge
    , 'is': operator.is_
    , 'in': lambda a, b: a in b
  
    , 'not': operator.not_
    , '~':  operator.invert
    , '+':  varary(operator.pos, operator.add)
    , '-':  varary(operator.neg, operator.sub)
    , '*':  operator.mul
    , '**': operator.pow
    , '/':  operator.truediv
    , '//': operator.floordiv
    , '%':  operator.mod
    , '!!': operator.getitem
    , '&':  operator.and_
    , '^':  operator.xor
    , '|':  operator.or_
    , '<<': operator.lshift
    , '>>': operator.rshift
  
      # Useful stuff.
-   , 'import': __import__
+   , 'import': importlib.import_module
    , 'foldl': functools.reduce
    , '~:': functools.partial
  })
  
Use importlib.import_module instead of __import__.
## Code Before:
import builtins
import operator
import functools

from ..compile import varary


builtins.__dict__.update({
    # Runtime counterparts of some stuff in `Compiler.builtins`.
    '$': lambda f, *xs: f(*xs)
  , ':': lambda f, *xs: f(*xs)
  , ',': lambda a, *xs: (a,) + xs

  , '<':  operator.lt
  , '<=': operator.le
  , '==': operator.eq
  , '!=': operator.ne
  , '>':  operator.gt
  , '>=': operator.ge
  , 'is': operator.is_
  , 'in': lambda a, b: a in b

  , 'not': operator.not_
  , '~':  operator.invert
  , '+':  varary(operator.pos, operator.add)
  , '-':  varary(operator.neg, operator.sub)
  , '*':  operator.mul
  , '**': operator.pow
  , '/':  operator.truediv
  , '//': operator.floordiv
  , '%':  operator.mod
  , '!!': operator.getitem
  , '&':  operator.and_
  , '^':  operator.xor
  , '|':  operator.or_
  , '<<': operator.lshift
  , '>>': operator.rshift

    # Useful stuff.
  , 'import': __import__
  , 'foldl': functools.reduce
  , '~:': functools.partial
})

## Instruction:
Use importlib.import_module instead of __import__.
## Code After:
import builtins
import operator
import functools
import importlib

from ..compile import varary


builtins.__dict__.update({
    # Runtime counterparts of some stuff in `Compiler.builtins`.
    '$': lambda f, *xs: f(*xs)
  , ':': lambda f, *xs: f(*xs)
  , ',': lambda a, *xs: (a,) + xs

  , '<':  operator.lt
  , '<=': operator.le
  , '==': operator.eq
  , '!=': operator.ne
  , '>':  operator.gt
  , '>=': operator.ge
  , 'is': operator.is_
  , 'in': lambda a, b: a in b

  , 'not': operator.not_
  , '~':  operator.invert
  , '+':  varary(operator.pos, operator.add)
  , '-':  varary(operator.neg, operator.sub)
  , '*':  operator.mul
  , '**': operator.pow
  , '/':  operator.truediv
  , '//': operator.floordiv
  , '%':  operator.mod
  , '!!': operator.getitem
  , '&':  operator.and_
  , '^':  operator.xor
  , '|':  operator.or_
  , '<<': operator.lshift
  , '>>': operator.rshift

    # Useful stuff.
  , 'import': importlib.import_module
  , 'foldl': functools.reduce
  , '~:': functools.partial
})
