#12543: improve import_statements
--------------------------------------------------+-------------------------
       Reporter:  aschilling                      |         Owner:  
sage-combinat
           Type:  enhancement                     |        Status:  
needs_review 
       Priority:  major                           |     Milestone:  sage-5.7    
 
      Component:  misc                            |    Resolution:              
 
       Keywords:  import_statements, development  |   Work issues:              
 
Report Upstream:  N/A                             |     Reviewers:              
 
        Authors:  Vincent Delecroix               |     Merged in:              
 
   Dependencies:                                  |      Stopgaps:              
 
--------------------------------------------------+-------------------------
Changes (by {'newvalue': u'Vincent Delecroix', 'oldvalue': u'Nicolas Thiery'}):

  * status:  new => needs_review
  * author:  Nicolas Thiery => Vincent Delecroix
  * component:  combinatorics => misc
  * keywords:  => import_statements, development


Old description:

> Currently, import_statements yields a name error if the class is not yet
> imported. For example
>
> {{{
>    sage: import_statements(ClonableIntArray)
>    NameError: name 'ClonableIntArray' is not defined
> }}}
>
> It would be desirable to have import_statements run a search_def in case
> the object is not imported by default in the interpreter. This would
> require passing the name of the object as:
>
> {{{
>     sage: import_statements("ClonableIntArray")
> }}}
>
> It also would probably require extending search_def to also look up
> classes and not only functions.

New description:

 Currently, import_statements yields a name error if the class is not yet
 imported. For example

 {{{
    sage: import_statements(ClonableIntArray)
    NameError: name 'ClonableIntArray' is not defined
 }}}

 It would be desirable to have import_statements run a search_def in case
 the object is not imported by default in the interpreter. This would
 require passing the name of the object as:

 {{{
     sage: import_statements("ClonableIntArray")
 }}}

 The patch improve import_statements by looking through SAGE modules in
 order to find an appropriate import. See the documentation for examples.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12543#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to