optimization question

Andrew Koenig ark at research.att.com
Mon Aug 12 16:23:30 EDT 2002


Bengt> ISTM (2) could be an option if you could arrange for s to be an
Bengt> instance of a class of your own design. (E.g., you write
Bengt> s.__getitem__(self, index) so that it returns yet another
Bengt> object (with s,i,j refs in it) that will participate in the
Bengt> '==' the way you'd like). You can then be secure, because the
Bengt> objects behave according to your own implementation ;-)

Yes.  But if I want s to be a sequence of an externally defined
type, I don't have that option.

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark



More information about the Python-list mailing list