mhammond / pywin32

Python for Windows (pywin32) Extensions
5.08k stars 801 forks source link

Provide docstrings for all functions #1348

Open cool-RR opened 5 years ago

cool-RR commented 5 years ago

When I run help(win32gui.MoveWindow) I get nothing. Would be helpful to get a docstring showing at least the signature of the function.

Avasam commented 2 years ago

I shall add. It's possible to write docstrings in a standard way that __signature__ and __tex_signature__ can be automatically generated when introspecting with inspect.signature. As it is, introspection tools have no idea about c extension methods signatures.

This can be done either by adding the support in AutoDuck, since a lot of functions already use comments to generate that information. See:

Or migrating to the Argument Clinic

This would be quite helpful for #1913 as it would allow better introspection. Making stubs more accurate and require less maintenance.