[NumPy-Tickets] [NumPy] #1494: functions return NotImplemented instead of raising error

NumPy Trac numpy-tickets@scipy....
Tue Jan 4 14:54:56 CST 2011


#1494: functions return NotImplemented instead of raising error
-----------------------+----------------------------------------------------
 Reporter:  josefpktd  |       Owner:  somebody    
     Type:  defect     |      Status:  needs_review
 Priority:  normal     |   Milestone:  2.0.0       
Component:  Other      |     Version:              
 Keywords:             |  
-----------------------+----------------------------------------------------
Changes (by jpeel):

  * status:  new => needs_review


Comment:

 All of the Numpy functions that I mentioned above were all ufuncs that
 took two arguments. There was some code for handling errors in
 ufunc_object.c that returned Py_NotImplemented when there were two
 arguments to the function rather than raising the NotImplemented
 exception. The comment by this code said 'To allow the other argument to
 be given a chance'. I don't see how that comment makes any sense. Does
 anyone know why this is in there?

 The patch I submitted removes these lines so that the correct exception is
 raised.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1494#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list