Inheritance from builtin list and override of methods.

OKB (not okblacke) brenNOSPAMbarn at NObrenSPAMbarn.net
Mon Nov 27 23:12:39 EST 2006


Carsten Haese wrote:

> You can change the behavior of a list's sort method by overriding
> sort. You can't change the behavior of sort by overriding
> __getitem__ and __setitem__, because sort does not call __getitem__
> or __setitem__. 

    	Why doesn't it?

-- 
--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