File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 4
4
5.1a0 (unreleased)
5
5
------------------
6
6
7
+ - Fix documentation for ``compile_restricted_function ``
8
+ (`#158 <https://github.com/zopefoundation/RestrictedPython/issues/158 >`_)
9
+
7
10
- Add support for (Python 3.8+) assignment expressions (i.e. the ``:= `` operator)
8
11
9
12
- Fix ``compile_restricted_function `` with SyntaxErrors that have no text
Original file line number Diff line number Diff line change @@ -55,16 +55,22 @@ API overview
55
55
56
56
Compiles source code into interpretable byte code with ``mode='function' ``.
57
57
58
- :param p: (required).
59
- :param body: (required).
60
- :param name: (required).
61
- :param filename: (required).
62
- :param globalize: (optional).
63
- :type p:
64
- :type body:
58
+ :param p: (required). a string representing the function parameters
59
+ :param body: (required). the function body
60
+ :param name: (required). the function name
61
+ :param filename: (optional). defaults to ``'<string>' ``
62
+ :param globalize: (optional). list of globals. defaults to ``None ``
63
+ :param flags: (optional). defaults to ``0 ``
64
+ :param dont_inherit: (optional). defaults to ``False ``
65
+ :param policy: (optional). defaults to ``RestrictingNodeTransformer ``
66
+ :type p: str or unicode text
67
+ :type body: str or unicode text
65
68
:type name: str or unicode text
66
69
:type filename: str or unicode text
67
- :type globalize:
70
+ :type globalize: None or list
71
+ :type flags: int
72
+ :type dont_inherit: int
73
+ :type policy: RestrictingNodeTransformer class
68
74
:return: byte code
69
75
70
76
The globalize argument, if specified, is a list of variable names to be
You can’t perform that action at this time.
0 commit comments