[Python-Dev] New winreg module really an improvement?

Mark Hammond mhammond@skippinet.com.au
Fri, 28 Jul 2000 13:57:44 +1000


Ive just updated the test suite so that test_winreg2.py actually works.

It appears that the new winreg.py module is still in a state of flux, but
all work has ceased.  The test for this module has lots of placeholders
that are not filled in.  Worse, the test code was checked in an obviously
broken state (presumably "to be done", but guess who the bunny who had to
do it was :-(

Browsing the source made it clear that the module docstrings are still
incomplete (eg "For information on the key API, open a key and look at its
docstring.").  As far as I can tell, there is no documentation in the
library reference for this module (but the underlying _winreg module does
have reasonable documentation)

This is the first time I have had a serious look at the new winreg module,
and the first time I have had to use it.  I found it quite unintuitive, and
it took me quite some time to update the test suite for what should have
been a trivial case:

Eg, the specific example I had a problem with was:

key[value]

Returns a result that includes the key index!  This would be similar to a
dictionary index _always_ returning the tuple, and the first element of the
tuple is _always_ the key you just indexed.

Has anyone else actually looked at or played with this, and still believe
it is an improvement over _winreg?  I personally find it unintuitive, and
will personally continue to use _winreg.  If we can't find anyone to
complete it, document it, and stand up and say they really like it, I
suggest we pull it.

Still-can't-see-the-added-value-ly,

Mark.