Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb58bc8c

Browse files
corona10erlend-aaslandEclips4
authored
pythongh-104469: Update README.txt for _testcapi (pythongh-104529)
*pythongh-104469: Update README.txt for _testcapiCo-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
1 parent1b5a2b0 commitb58bc8c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎Modules/_testcapi/README.txt‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
Tests in this directory are compiled into the _testcapi extension.
22
The main file for the extension is Modules/_testcapimodule.c, which
33
calls `_PyTestCapi_Init_*` from these functions.
4+
5+
General guideline when writing test code for C API.
6+
* Use Argument Clinic to minimise the amount of boilerplate code.
7+
* Add a newline between the argument spec and the docstring.
8+
* If a test description is needed, make sure the added docstring clearly and succinctly describes purpose of the function.
9+
* DRY, use the clone feature of Argument Clinic.
10+
* Try to avoid adding new interned strings; reuse existing parameter names if possible. Use the `as` feature of Argument Clinic to override the C variable name, if needed.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp