Skip to content

Commit

Permalink
Add 'C API' to the style guide (#1222)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Nov 26, 2023
1 parent f73a918 commit a9aaedf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions documentation/style-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ presentation in the Python documentation.
Other terms and words deserve special mention as well; these conventions should
be used to ensure consistency throughout the documentation:

C API
Python's `API <https://docs.python.org/3/c-api/>`_ used by C programmers
to write extension modules. All caps and unhyphenated.

CPU
For "central processing unit." Many style guides say this should be
spelled out on the first use (and if you must use it, do so!). For
Expand Down
2 changes: 1 addition & 1 deletion internals/parser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ When a pegen-generated parser detects that an exception is raised, it will
is and it will unwind the stack and report the exception. This means that if a
:ref:`rule action <peg-grammar-actions>` raises an exception all parsing will
stop at that exact point. This is done to allow to correctly propagate any
exception set by calling Python C-API functions. This also includes :exc:`SyntaxError`
exception set by calling Python's C API functions. This also includes :exc:`SyntaxError`
exceptions and this is the main mechanism the parser uses to report custom syntax
error messages.

Expand Down

0 comments on commit a9aaedf

Please sign in to comment.