Well, there might be a better way Carpetsmoker but this comes to mind:
since you obviously have access to the winreg object within the function, and just need to know the key and other arguments: why not pass the key as a string and use eval() to access the corresponding attribute/method through it. Since it appears to be the data structure you want to use to access it by, lol.
example:
Code:
>>> class Klass:
... name = "I am called Klass"
...
>>> k=Klass()
>>> def test(regkey, key, value):
... print( eval("k.%s" % str(regkey)) )
...
>>> test('name', 'and', 'others')
I am called Klass
>>>
__________________
My
Journal
Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.