#4330: interfaces function_call(...) function is a total MESS
------------------------+---------------------------------------------------
 Reporter:  was         |       Owner:  was     
     Type:  defect      |      Status:  new     
 Priority:  major       |   Milestone:  sage-3.2
Component:  interfaces  |    Keywords:          
------------------------+---------------------------------------------------
 I just noticed that the functional_call function in the interfaces
 directory (defined in various files) is a bug-ridden mess.

 For example
 {{{
 sage: a = mathematica('N[BesselK[1+I, 2+ 3*I], 20]')
 sage: a.Re()
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/was/build/sage-3.1.3.alpha3/<ipython console> in <module>()

 /home/was/build/sage-3.1.3.alpha3/local/lib/python2.5/site-
 packages/sage/interfaces/expect.pyc in __call__(self, *args, **kwds)
    1241
    1242     def __call__(self, *args, **kwds):
 -> 1243         return self._obj.parent().function_call(self._name,
 [self._obj] + list(args), kwds)
    1244
    1245     def help(self):

 TypeError: function_call() takes at most 3 arguments (4 given)
 sage:
 }}}

 Also, I noticed that in expect.py the definition of function_call is:
 {{{
 def function_call(self, function, args=[], kwds={}):
 }}}
 This is the typical stupid Python newbiew mistake (of course I'm the
 newbie that is to blame here...), which leads to massive subtle bugs.
 Things are done right in function_call in r.py, and that pattern should be
 used everywhere else.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4330>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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