promoting [] by superclass?

Peter Maas peter.maas at mplusr.de
Wed Jun 9 09:21:09 EDT 2004


Erik Max Francis schrieb:
> Jim Newton wrote:
[...]
>>class Pair(list):
>>   ...
>>
>>how can i "cast",  "promote" [] to class Pair?
> 
> 
> You can't.

Perhaps I've got it wrong but Jim probably asks for overwriting
the __getitem__ method.

Mit freundlichen Gruessen,

Peter Maas

-- 
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas at mplusr.de
-------------------------------------------------------------------



More information about the Python-list mailing list