Steven D'Aprano <[EMAIL PROTECTED]> wrote:

> Besides, if you want this behaviour, you can add it yourself:
> 
> class mylist(list):
>     # Untested!
>     def __getitem__(self, index):
>         if type(index) is list:
>              return [self[i] for i in index]
>         return super(mylist, self).__getitem__(index)
> 
> list = mylist

It works very nicely, just don't try passing it a recursive list.

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

Reply via email to