PEP 436: fix markup and make it consistent.
This commit is contained in:
parent
3f90114628
commit
298f064289
32
pep-0436.txt
32
pep-0436.txt
|
@ -162,9 +162,7 @@ To give some flavor of the proposed DSL syntax, here are some sample Clinic
|
|||
code blocks. This first block reflects the normally preferred style, including
|
||||
blank lines between parameters and per-argument docstrings.
|
||||
It also includes a user-defined converter (``path_t``) created
|
||||
locally
|
||||
|
||||
::
|
||||
locally::
|
||||
|
||||
/*[clinic]
|
||||
os.stat as os_stat_fn -> stat result
|
||||
|
@ -275,15 +273,11 @@ Module and Class Declarations
|
|||
-----------------------------
|
||||
|
||||
When a C file implements a module or class, this should be declared to
|
||||
Clinic. The syntax is simple:
|
||||
|
||||
::
|
||||
Clinic. The syntax is simple::
|
||||
|
||||
module module_name
|
||||
|
||||
or
|
||||
|
||||
::
|
||||
or ::
|
||||
|
||||
class module_name.class_name
|
||||
|
||||
|
@ -297,9 +291,7 @@ from the top-level module. Nested modules and classes are supported.
|
|||
Function Declaration
|
||||
--------------------
|
||||
|
||||
The full form of the function declaration is as follows:
|
||||
|
||||
::
|
||||
The full form of the function declaration is as follows::
|
||||
|
||||
dotted.name [ as legal_c_id ] [ -> return_annotation ]
|
||||
|
||||
|
@ -323,9 +315,7 @@ a *return converter*.
|
|||
Parameter Declaration
|
||||
---------------------
|
||||
|
||||
The full form of the parameter declaration line as as follows:
|
||||
|
||||
::
|
||||
The full form of the parameter declaration line as as follows::
|
||||
|
||||
name: converter [ (parameter=value [, parameter2=value2]) ] [ = default]
|
||||
|
||||
|
@ -377,9 +367,7 @@ For convenience's sake in converting existing code to Argument Clinic,
|
|||
Clinic provides a set of legacy converters that match ``PyArg_ParseTuple``
|
||||
format units. They are specified as a C string containing the format
|
||||
unit. For example, to specify a parameter "foo" as taking a Python
|
||||
"int" and emitting a C int, you could specify:
|
||||
|
||||
::
|
||||
"int" and emitting a C int, you could specify::
|
||||
|
||||
foo : "i"
|
||||
|
||||
|
@ -554,9 +542,7 @@ Argument Clinic also permits "directives" in Clinic code blocks.
|
|||
Directives are similar to *pragmas* in C; they are statements
|
||||
that modify Argument Clinic's behavior.
|
||||
|
||||
The format of a directive is as follows:
|
||||
|
||||
::
|
||||
The format of a directive is as follows::
|
||||
|
||||
directive_name [argument [second_argument [ ... ]]]
|
||||
|
||||
|
@ -581,9 +567,7 @@ Python Code
|
|||
|
||||
Argument Clinic also permits embedding Python code inside C files,
|
||||
which is executed in-place when Argument Clinic processes the file.
|
||||
Embedded code looks like this:
|
||||
|
||||
::
|
||||
Embedded code looks like this::
|
||||
|
||||
/*[python]
|
||||
|
||||
|
|
Loading…
Reference in New Issue