-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-19225: Lack of c api exceptions doc #881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-19225: Lack of c api exceptions doc #881
Conversation
@cocoatomo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @birkenfeld, @DanielStutzbach and @benjaminp to be potential reviewers. |
Doc/c-api/exceptions.rst
Outdated
| :c:data:`PyExc_BaseException` | :exc:`BaseException` | \(1) | | ||
+-----------------------------------------+---------------------------------+----------+ | ||
| :c:data:`PyExc_Exception` | :exc:`Exception` | \(1) | | ||
+-----------------------------------------+---------------------------------+----------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel BaseException and Exception are special enough to ignore alphabetical order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the same is true for Warning
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Doc/c-api/exceptions.rst
Outdated
| :c:data:`PyExc_BaseException` | :exc:`BaseException` | \(1) | | ||
+-----------------------------------------+---------------------------------+----------+ | ||
| :c:data:`PyExc_Exception` | :exc:`Exception` | \(1) | | ||
+-----------------------------------------+---------------------------------+----------+ | ||
| :c:data:`PyExc_ArithmeticError` | :exc:`ArithmeticError` | \(1) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since that are definitions of PyExc_* names
, wouldn't be better to use the c:var
directive?
.. c:var:: PyExc_ArithmeticError
Perhaps the index
directive below will be not needed after that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this table is the most suitable place for definition of PyExc_*
names.
I would fix these markup and delete index
directives.
Doc/c-api/exceptions.rst
Outdated
| :c:data:`PyExc_BaseException` | :exc:`BaseException` | \(1) | | ||
+-----------------------------------------+---------------------------------+----------+ | ||
| :c:data:`PyExc_Exception` | :exc:`Exception` | \(1) | | ||
+-----------------------------------------+---------------------------------+----------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the same is true for Warning
.
Doc/c-api/exceptions.rst
Outdated
Notes: | ||
|
||
(1) | ||
This is a base class for other standard exceptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... for other standard warning categories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks for your good advisement. I updated the pull request. |
The tables will be really huge with the |
Hmm, then it would be better to restore the variant with |
I changed |
@methane @serhiy-storchaka @MSeifert04 |
Move |
Thanks for your comment. |
…ames in C API doc (pythonGH-881) Move the `.. index` directive to more appropriate place. (cherry picked from commit e8c7631)
…ames in C API doc (pythonGH-881) Move the `.. index` directive to more appropriate place.. (cherry picked from commit e8c7631)
see bpo-19225.
I create this patch based on the patch created by Tamás Bence Gedai (beng94).