#16337: key parameter of cached_method is not correctly propagated
------------------------+----------------------------
   Reporter:  saraedum  |            Owner:
       Type:  defect    |           Status:  new
   Priority:  minor     |        Milestone:  sage-6.3
  Component:  misc      |         Keywords:
  Merged in:            |          Authors:
  Reviewers:            |  Report Upstream:  N/A
Work issues:            |           Branch:
     Commit:            |     Dependencies:
   Stopgaps:            |
------------------------+----------------------------
 In the following example, the last line is incorrect:
 {{{
 sage: class Foo:
 ....:     @cached_method(key=lambda self,y: y+1)
 ....:     def f(self, y):
 ....:         return y - 1
 sage: class Bar:
 ....:     f = Foo.f

 sage: b = Bar()
 sage: b.f(0)
 -1
 sage: b.f.cache
 {((0,), ()): -1}
 }}}

 It appears that I forgot to propagate the `key` parameter in some places
 while working on #15657.

--
Ticket URL: <http://trac.sagemath.org/ticket/16337>
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