Zooko wrote: >Just to help me think about it I'll suggest a non-Pythonic and incompatible way: >there is no "import" keyword. When you invoke a constructor, function, method, >etc., you have to pass as arguments references to everything that the code will >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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4