#6937: Fix cached_function to handle defaults better. [with patch, needs work]
---------------------+------------------------------------------------------
 Reporter:  boothby  |       Owner:  boothby
     Type:  defect   |      Status:  new    
 Priority:  minor    |   Milestone:         
Component:  misc     |    Keywords:         
 Reviewer:           |      Author:  boothby
   Merged:           |  
---------------------+------------------------------------------------------

Comment(by rlm):

 Here's a problem:

 {{{
 sage: class Foo:
     def bar(self, a, b, c=0, d=None):
         return a
 sage: A = Foo()
 sage: A.bar(1,2,3,4)
 1
 sage: from sage.misc.function_mangling import ArgumentFixer
 sage: AA = ArgumentFixer(A.bar)
 sage: AA.fix_to_named(1,2,3,4)
 ((), (('self', 1), ('a', 2), ('b', 3), ('c', 4), ('d', None)))

 }}}

 Here, self isn't 1. a should be 1.

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