Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add the dot to make the reflink.
  • Loading branch information
junkmd committed Nov 16, 2024
commit dafb5b225a451adfa8763575fde7b77dcfa8f334
2 changes: 1 addition & 1 deletion Doc/library/ctypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1800,7 +1800,7 @@ different ways, depending on the type and number of the parameters in the call:
the interface identifier which is used in extended error reporting.

If *iid* is not specified, a :exc:`WindowsError` is raised if the COM method
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WindowsError is now an alias of OSError.

Suggested change
If *iid* is not specified, a :exc:`WindowsError` is raised if the COM method
If *iid* is not specified, an :exc:`OSError` is raised if the COM method

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

Thank you.

call fails. If *iid* is specified, a :exc:`COMError` is raised instead.
call fails. If *iid* is specified, a :exc:`.COMError` is raised instead.
Comment thread
junkmd marked this conversation as resolved.
Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think (but I'm not 100% sure) that .COMError means Sphinx will search all namespaces, not just ctypes, for a COMError. So it would be better to use ctypes.COMError explicitly:

Suggested change
call fails. If *iid* is specified, a :exc:`.COMError` is raised instead.
call fails. If *iid* is specified, a :exc:`~ctypes.COMError` is raised instead.


COM methods use a special calling convention: They require a pointer to
the COM interface as first argument, in addition to those parameters that
Expand Down