Import Cost Changes
This update fixes some issues with the number of simulation ticks spent on imports.
-from file import now costs 1 tick.
-import file is still free.
-Reading from a module like y = file.x is now free as long as the variable file has been assigned by an import statement. This is analogous to functions being free as long as they have been directly assigned by a def statement, and prevents exploits that abuse the dynamic nature of modules to do completely free computations.
-Writing to modules like file.x = y now costs the same as reading from them.
-def and import statements inside an if, while or for block no longer make the functions/modules they create free, because this could also be used to do free computations.
-Fixed importing into local scope.
Комментарии 0
Гостевые никнеймы не подтверждают личность. Все комментарии проходят проверку владельцем сайта.
Обсуждение ещё не началось.