diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2017-11-05 00:23:36 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-11-05 00:25:18 +0100 |
commit | 9a33e34bd6e0c5dfb5ce6e18ec640a9129f1f0b0 (patch) | |
tree | f67cc6d77f1a15f8a3ffc403e1ead1d83374e679 /Cython/Compiler/ModuleNode.py | |
parent | 3402988dac43fb52a6edef93bf61917ee7d902b0 (diff) | |
download | cython-9a33e34bd6e0c5dfb5ce6e18ec640a9129f1f0b0.tar.gz |
Add docstring.
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index f905b614c..9f1323bf2 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2475,6 +2475,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.exit_cfunc_scope() def mod_init_subfunction(self, scope, orig_code): + """ + Return a context manager that allows deviating the module init code generation + into a separate function and instead inserts a call to it. + + Can be reused sequentially to create multiple functions. + The functions get inserted at the point where the context manager was created. + The call gets inserted where the context manager is used (on entry). + """ prototypes = orig_code.insertion_point() prototypes.putln("") function_code = orig_code.insertion_point() |