copy on write

OKB (not okblacke) brenNOSPAMbarn at NObrenSPAMbarn.net
Fri Feb 3 17:15:40 CET 2012


Steven D'Aprano wrote:

> Perhaps lists shouldn't define += at all, but then people will
> complain that mylist += another_list is slow. Telling them to use
> mylist.extend instead just makes them cranky. After all, mylist +
> another_list works, so why shouldn't += work?

    	It would work, it just wouldn't work in-place.

-- 
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead.  Go, instead, where there is
no path, and leave a trail."
	--author unknown



More information about the Python-list mailing list