#8456: lazy import improvements
-------------------------------+--------------------------------------------
   Reporter:  robertwb         |       Owner:  tbd       
       Type:  enhancement      |      Status:  needs_info
   Priority:  major            |   Milestone:  sage-4.6.1
  Component:  misc             |    Keywords:            
     Author:  Robert Bradshaw  |    Upstream:  N/A       
   Reviewer:                   |      Merged:            
Work_issues:                   |  
-------------------------------+--------------------------------------------
Changes (by lftabera):

  * status:  needs_review => needs_info


Comment:

 As a user, I would be puzzled if I found at the begining of the session:

 {{{
 sage: InfinityRing
 <sage.misc.lazy_import.LazyImport object at 0x7f51dca0e290>
 sage: InfinityRing()
 Zero
 sage: InfinityRing
 The Infinity Ring
 }}}

 So I think that LazyImport should have a __repr__ method that inserts the
 real object in the namespace.

 The problem is that once you start with this kind of things you do not
 know where to stop...

 {{{
 sage: infinity in InfinityRing
 TypeError: argument of type 'sage.misc.lazy_import.LazyImport' is not
 iterable
 }}}

 So, what about __repr__, __contains__, _latex_, __cmp__ ? Is it worth to
 add them to the class? Should this be in another ticket?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8456#comment:12>
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