OKB (not okblacke) wrote:
> 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?

Because the concerns of thousands of legitimate programmers who want
good performance out of their sorts outweigh the concerns of the one or
two hax0r d00ds who think it would be cool to hook into sort internals.


live-long-and-prosper-ly yr's,


Carl Banks

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to