UserDict deprecated

Uwe Mayer merkosh at
Sat Jan 1 17:15:55 EST 2005

Saturday 01 January 2005 22:48 pm Hans Nowak wrote:

> Uwe Mayer wrote:
>> Why is the UserDict module is deprecated after Python 2.2. The
>> application of it I have in mind is, i.e. multiple inheritance from
>> "file" and "dic" - which is not possible.
> I am curious, what would you do with a class that derives from both file
> and dict?

I was writing a class that read /writes some binary file format. I
implemented the functions from the file interface such that they are
refering to records. However, the file format has some header fields and
I'd wanted to grant access to those via the dict-interface.

Another example: working with PyQt I have an instance of a QListView and
wanted to use the list-interface to get and set individual records.


More information about the Python-list mailing list