[Python-Dev] Re: Class/type dichotomy thoughts

Moshe Zadka py-dev@zadka.site.co.il
Tue, 07 Nov 2000 14:24:22 +0200

> Take e.g. dictionaries: you could easily add a new dictionary
> type which uses case-insensitive string keys by extending the
> existing dictionary type.
> The new type would reuse most of the slots of the original
> type and only replace the ones needed for lookup with the
> new logic for case-insensitivity.
> Then it sets the type id to PyDict_TypeID and Python will
> use it as if it were an original dictionary object. The
> underlying type objects would be different though (and also
> the type object address which is currently used to identify
> a builtin type).

This kind of thing will also help a numeric system like PEP-0228
be implemented more easily.
Moshe Zadka <sig@zadka.site.co.il>
This is a signature anti-virus. 
Please stop the spread of signature viruses!