On Friday, April 7, 2017 at 9:18:47 AM UTC-7, Travis Scrimshaw wrote:
>
> You're welcome, with a very special thanks to Jeroen for his help.
>
> From a user point of view, they are already imported so you shouldn't have 
> to do anything. However, I am split on doing imports from all or the 
> specific module, but I defer to the latter because it could potentially not 
> trigger lazy imports.
>

If "lcm" were a lazy import in sage.arith.all (or anywhere) then

from sage.arith.all import lcm

is NOT the right way to import it. It will get you a LazyImport proxy 
object that ,any time it is accessed, will try to remove itself from its 
original scope. The problem with lazy imports is that you SHOULD NOT 
further import them somewhere else via a normal import. 

Jeroen recently noted that customizing builtin.__import__ is a possibility. 
We could insert something there to filter out and reshape LazyImport proxy 
objects. (it's not the only way these objects get misplaced but it is the 
most common one in practice. Importing infrastructure has changed 
significantly between Py2 and Py3, so unless LazyImport is now a very high 
priority, we should probably make the change only after migrating to Py3.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to