[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)
Zachary Ware
report at bugs.python.org
Fri Jan 10 20:55:24 CET 2014
Zachary Ware added the comment:
Here's the complete patch for PC/winreg.c. One clinic/signature/pydoc issue I've noticed:
>>> help(winreg.HKEYType.Close)
Help on method_descriptor:
Close(...) <--- No signature
Close() <--- Extra
Closes the underlying Windows handle.
If the handle is already closed, no error is raised.
>>> winreg.HKEYType.Close.__doc__
'Close()\nCloses the underlying Windows handle.\n\nIf the handle is already clos
ed, no error is raised.'
>>> winreg.HKEYType.Close.__text_signature__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'method_descriptor' object has no attribute '__text_signature__'
My gut feeling is that it's a Clinic issue; Clinic should be adding 'self' to the signature, which should then be picked up by the __text_signature__ parser, and used by inspect and pydoc.
As far as the patch, one point I'd like some extra scrutiny on is the HKEY_converter (and C clinic_HKEY_converter). I don't understand how all of the C machinery there works properly, so I can't say with confidence that it is right. It compiles without errors and the tests pass, but beyond that, I can't guarantee anything.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20172>
_______________________________________
More information about the Python-bugs-list
mailing list