#12482: isinstance failure on lazy imported class
-----------------------+----------------------------------------------------
   Reporter:  nthiery  |          Owner:  jason   
       Type:  defect   |         Status:  new     
   Priority:  major    |      Milestone:  sage-5.0
  Component:  misc     |       Keywords:          
Work_issues:           |       Upstream:  N/A     
   Reviewer:           |         Author:          
     Merged:           |   Dependencies:          
-----------------------+----------------------------------------------------
 isinstance may fail on a lazy imported class, which can cause hard to
 track history-dependent failures (just been hit)::

 {{{
 sage: lazy_import('sage.rings.rational_field', 'RationalField')
 sage: isinstance(QQ, RationalField)
 False
 sage: isinstance(QQ, RationalField)
 True
 }}}

 Would there be a way to ensure that isinstance triggers the importing of
 the class *before* its use?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12482>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to