adjacent differences with a list comprehension

Greg Ewing (using me at
Tue Mar 25 23:58:27 CET 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

Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand

More information about the Python-list mailing list