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

Commit1c3836d

Browse files
committed
Merge pull request#1606 from mdboom/cxx_extension_policy
Document the C/C++ code guidelines
2 parents1787a1a +9e7f286 commit1c3836d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎doc/devel/coding_guide.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,25 @@ Installation
105105
ones, make sure the new files included in the match patterns in
106106
:file:`MANIFEST.in`, and/or in `package_data` in `setup.py`.
107107

108+
C/C++ extensions
109+
----------------
110+
111+
* Extensions may be written in C or C++.
112+
113+
* Code style should conform to PEP7 (understanding that PEP7 doesn't
114+
address C++, but most of its admonitions still apply).
115+
116+
* Interfacing with Python may be done either with the raw Python/C API
117+
or Cython. Use of PyCXX is discouraged for new code.
118+
119+
* Python/C interface code should be kept separate from the core C/C++
120+
code. The interface code should be named `FOO_wrap.cpp`.
121+
122+
* Header file documentation (aka docstrings) should be in Numpydoc
123+
format. We don't plan on using automated tools for these
124+
docstrings, and the Numpydoc format is well understood in the
125+
scientific Python community.
126+
108127
Style guide
109128
===========
110129

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp