#19585: Improve efficiency of calling GAP functions
-------------------------------------+-------------------------------------
       Reporter:  jaanos             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.10
      Component:  interfaces         |   Resolution:
       Keywords:  GAP functions      |    Merged in:
  interface                          |    Reviewers:  Travis Scrimshaw
        Authors:  Janoš Vidali       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  31a173bccd732cb8d8b656d6882dcec074a87b7d
  u/jaanos/improve_calling_gap_function-19585|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by tscrim):

 While in principle, I think these recent changes are okay, could someone
 else double-check that we want to do things this way?

 As for the current code, I would change:
 {{{#!diff
 -        if isinstance(self._name, six.string_types) and
 parent._eval_using_file_cutoff and \
 -           parent._eval_using_file_cutoff < len(self._name):
 -            self._get_using_file = True
 +        self._get_using_file = (isinstance(self._name, six.string_types)
 +                                and parent._eval_using_file_cutoff
 +                                and parent._eval_using_file_cutoff <
 len(self._name))
 }}}
 so we don't have to do a `try/except` block:
 {{{#!diff
          if use_file is None:
 -            try:
 -                use_file = self._get_using_file
 -            except AttributeError:
 -                use_file = False
 +            use_file = self._get_using_file
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/19585#comment:26>
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to