_dictinfo.py for python 3.3
python 3.3 has 3 structs that define a dictionary object. I am trying to use your code as a guide plus use the cpython source code to modify _dictinfo.py.
The link to my code is here.
Please see lines 98 - 107. I cannot get line 103 to work. Somehow the dictionary does not have the correct underlying structure.
Also: line 45 of my code: 'dk_entries', POINTER(PyDictKeyEntry))
The Cpython struct PyDictKeysObject has the field dk_entries, of type PyDictKeyEntry. Is my class PyDictKeysObject defined incorrectly?
After learning about hash tables in an algorithms class, I wanted to explore the collision algorithm of python dictionaries and compare it to a hash table I wrote that uses double hash linear probe open addressing. I plotted the cumulative cost of inserting the words of a Tale of Two Cities into my hash table (written in python). The next step is to plot the same data for a python dictionary.
Then I found your PyCon2010 talk. But now I'm stuck.
Thanks so much! Leslie Klein firstname.lastname@example.org