adjacent differences with a list comprehension

Greg Ewing (using news.cis.dfn.de) me at privacy.net
Tue Mar 25 17:58:27 EST 2003


Alex Martelli wrote:
> I have no idea how or why operator.sub can be faster
> than int.__sub__ in this case...!

Perhaps because int.__sub__ returns a wrapper object
around the underlying function, whereas operator.sub
provides more direct access to it? Not sure about
that.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list