#12601: @cached_method does not work for special methods
-------------------------------------------------+-------------------------
       Reporter:  saraedum                       |        Owner:  jason
           Type:  enhancement                    |       Status:
       Priority:  minor                          |  needs_review
      Component:  misc                           |    Milestone:  sage-5.12
       Keywords:  cached_method, cache,          |   Resolution:
  operator, special method                       |    Merged in:
        Authors:  Simon King                     |    Reviewers:
Report Upstream:  Completely fixed; Fix          |  Work issues:
  reported upstream                              |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:  #15038                         |
-------------------------------------------------+-------------------------

Comment (by SimonKing):

 According to the patchbot, there is no slow-down in startup time. Hence,
 we might think of following your suggestion to let `@cached_method` be a
 slightly more expensive test for choosing between `CachedMethod` and
 `CachedSpecialMethod`.

 Recall that I am not totally convinced that a more explicit choice ("only
 be special for methods that are ''really'' special in Python") has any
 benefit. Choosing a `CachedSpecialMethod` for a double-underscore ''non-
 special'' method will result in a working cached method, but might have a
 speed-penalty. However, this speed-penalty would only occur if the
 instance does not allow attribute assignment; otherwise, there is no
 difference in speed nor in functionality between the two wrappers. That's
 why I think it is fine to just test for double underscores.

 Anyway, the patchbot also reports a failure. I could not reproduce it at
 home. So, I hope it is random noise.

--
Ticket URL: <http://trac.sagemath.org/ticket/12601#comment:13>
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/groups/opt_out.

Reply via email to