hi all, I would like to create a class that specializes Python
dictionary.  I would like an instance of this class to store
objects representing html form data, and I would like to have an
instance of this Data_Set class be able to use the Python dictionary
method pop to remove objects as I see fit.  I defined the
following:<br>
<br>
class Data_Set(dict):<br>
&nbsp;&nbsp;&nbsp; def __init__(self, dict_of_datum_objects, required=None):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.keys = dict_of_datum_objects.keys<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.values = dict_of_datum_objects.values<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.required = required<br>
<br>
For some reason, whenever I create an instance of this class with data,
all I get is an empty dictionary.&nbsp; As soon as I redefine my class
to no longer inherit from Python dictionary, then I get expected
behavior, but now I don't have benefit of Python dictionary methods
such as pop and has_key:<br>
<br>
sdso = Data_Set({'full_name':'full_name_obj', 'address_line_1':'address_line_1_obj'})<br>
&gt;&gt;&gt; sdso<br>
{}<br>
&gt;&gt;&gt; class Data_Set:<br>
&nbsp;&nbsp;&nbsp; def __init__(self, dict_of_datum, required=None):<br>
&nbsp;&nbsp; &nbsp;self.keys = dict_of_datum.keys<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.values = dict_of_datum.values<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.items = dict_of_datum.items<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.required = required<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>
&gt;&gt;&gt; sdso = Data_Set({'full_name':'full_name_obj', 'address_line_1':'address_line_1_obj'})<br>
&gt;&gt;&gt; sdso<br>
&lt;__main__.Data_Set instance at 0x419690ac&gt;<br>
&gt;&gt;&gt; sdso.keys()<br>
['full_name', 'address_line_1']<br>
&gt;&gt;&gt; sdso.pop('full_name')<br>
<br>
Traceback (most recent call last):<br>
&nbsp; File &quot;&lt;pyshell#311&gt;&quot;, line 1, in -toplevel-<br>
&nbsp;&nbsp;&nbsp; sdso.pop('full_name')<br>
AttributeError: Data_Set instance has no attribute 'pop'<br>
<br>
Am I doing something wrong ?<br>