[Numpy-tickets] [NumPy] #957: decorators don't work with test generators

NumPy numpy-tickets@scipy....
Mon Nov 24 01:07:55 CST 2008

#957: decorators don't work with test generators
 Reporter:  jarrod.millman  |        Owner:  somebody
     Type:  defect          |       Status:  new     
 Priority:  normal          |    Milestone:  1.3.0   
Component:  numpy.testing   |      Version:  devel   
 Severity:  normal          |   Resolution:          
 Keywords:                  |  
Comment (by jarrod.millman):

 Fernando gave a talk at the last Baypiggies meeting and asked if anyone
 new how to tell via introspection if you are dealing with a "standard" or
 generator function.  Here is Alex Martelli's response:

 Please be sure to read the comment by Matt Good.

 On the Baypiggies mailing list, Wesley Chun had this to add:
 Also for those interested in exploring further where he [Matt Good] found
 it's in the 2.5.2 docs:  http://www.python.org/doc/2.5.2/ref/types.html

 look for the "Internal Types" -> "Code Objects" section where it reads
 as follows:

 "The following flag bits are defined for co_flags: bit 0x04 is set if
 the function uses the "*arguments" syntax to accept an arbitrary
 number of positional arguments; bit 0x08 is set if the function uses
 the "**keywords" syntax to accept arbitrary keyword arguments; bit
 0x20 is set if the function is a generator."

Ticket URL: <http://scipy.org/scipy/numpy/ticket/957#comment:2>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list