Robert Bradshaw wrote: >>> Dag Sverre Seljebotn wrote: >>> >>>> Andrew Straw wrote:
>>> great aspect of Cython, IMO, is that it makes Python/C bridges easier, >>> not to adhere to the minimum standards specified by a PEP. Thus a small >>> amount of additional error checking seems OK to me. Also, as another >>> >> Well, in this case, the error check should be done by inserting some >> code automatically in the definition of __getbuffer__, so that Python 3 >> consumers also get advantage of it, and so that we don't second guess >> how good non-Cython implementations are. So the check is still inserted >> in the wrong place. > > I agree, this is the right place to put the check. And I think it is very > worth the (relatively small) overhead to insert a check here. Just to be clear (re-reading this bit after Robert's response makes me realize I'm confused about your meaning): what do you mean by "the definition of __getbuffer__" -- the C Python implementation of PyObject_GetBuffer()? I thought my patch did affect the (Cython) definition of __getbuffer__. Also, wouldn't Cython emit the same C code for Python 3? -Andrew _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
