optimization question
Bengt Richter
bokr at oz.net
Mon Aug 12 19:24:14 EDT 2002
On Mon, 12 Aug 2002 20:23:30 GMT, Andrew Koenig <ark at research.att.com> wrote:
>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.
>
What if you wrap the external data as soon as it comes through your black
box's interface?
Regards,
Bengt Richter
More information about the Python-list
mailing list