File: index.rst

package info (click to toggle)
python-enaml 0.19.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,284 kB
  • sloc: python: 31,443; cpp: 4,499; makefile: 140; javascript: 68; lisp: 53; sh: 20
file content (30 lines) | stat: -rw-r--r-- 1,114 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.. _developer_notes:

Developer notes
================

These notes are meant to help developers and contributors with regards to some
details of the implementation and coding style of the project.

Python codebase
---------------

The Python codebase currently targets Python 3.6+, strives to follow PEP 8 and
uses Numpy style docstring.


Python C++ bindings
-------------------

The bindings are hand-written and relies on cppy (https://github.com/nucleic/cppy).
Enaml tries to use a reasonably modern C API and to support sub-interpreter,
this has a couple of consequences:

- static variables use is limited to cases that cannot lead to state leakage
  between multiple sub-interpreters. Note that this is currently not heavily
  tested and may require some improvements.
- all the non exported symbol are enclosed in anonymous namespaces
- enaml does not use static types and only dynamical types (note that the
  type slots and related structures are stored in a static variable)
- modules use the multi-phases initialization mechanism as defined in
  PEP 489 -- Multi-phase extension module initialization