8000 Document the C/C++ code guidelines · matplotlib/matplotlib@9e7f286 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e7f286

Browse files
committed
Document the C/C++ code guidelines
1 parent 127f474 commit 9e7f286

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)
0