#7939: shorten doctests in sage/rings/multi_polynomial_ideal.py
-------------------------------+--------------------------------------------
   Reporter:  rlm              |       Owner:  tbd       
       Type:  defect           |      Status:  needs_info
   Priority:  major            |   Milestone:  sage-4.3.2
  Component:  interfaces       |    Keywords:            
     Author:  Martin Albrecht  |    Upstream:  N/A       
   Reviewer:                   |      Merged:            
Work_issues:                   |  
-------------------------------+--------------------------------------------

Comment(by malb):

 We use that already for the pexpect interface, I was thinking about only
 calling that but that wouldn't update the list once a new library is
 loaded in libsingular but not in Singular itself.

 {{{
 #!python
     def trait_names(self):
         """
          Return a list of all Singular commands.

          EXAMPLES::

              sage: singular.trait_names()
              ['exteriorPower',
               ...
               'stdfglm']
          """
         p = re.compile("// *([a-z0-9A-Z_]*).*") #compiles regular
 expression
         proclist = self.eval("listvar(proc)").splitlines()
         return [p.match(line).group(int(1)) for line in proclist]
 }}}

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