[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

Clement Rouault report at bugs.python.org
Tue May 24 06:50:04 EDT 2016


Clement Rouault added the comment:

My comment was about the behavior of `winreg.QueryValueEx`. The current behavior is:

>>> import winreg
>>> tstkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, "TestKey")
>>> winreg.QueryValueEx(tstkey, "MYDWORD") # a REG_DWORD value
(16909060, 4)
>>> winreg.QueryValueEx(tstkey, "MYQWORD") # a REG_QWORD value
(b'\x08\x07\x06\x05\x04\x03\x02\x01', 11)

With this patch the new behavior would be:

>>> winreg.QueryValueEx(tstkey, "MYQWORD") # a REG_QWORD value
(72623859790382856, 11)

I agree that exposing REG_QWORD is a new feature.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23026>
_______________________________________


More information about the Python-bugs-list mailing list