Just to help me think about it I'll suggest a non-Pythonic and
there is no "import" keyword. When you invoke a constructor, function,
etc., you have to pass as arguments references to everything that the
need to do its job. So, assuming the tic-tac-toe game requires the "math" module and the "string" module, I would have to write:
There's a *much* simpler way to do this. 'import' is implemented by calling an '__import__' function -- which of course is a capability. To do mediated imports, it's only necessary to supply a mediating version of '__import__'. One also needs a specialized version of '__import__' to set up a newly imported module's builtins.