diff --git a/CHANGES.rst b/CHANGES.rst index 35cf0dd..9da99cf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changes 5.1a0 (unreleased) ------------------ +- Fix documentation for ``compile_restricted_function`` + (`#158 `_) + - Add support for (Python 3.8+) assignment expressions (i.e. the ``:=`` operator) - Fix ``compile_restricted_function`` with SyntaxErrors that have no text diff --git a/docs/usage/api.rst b/docs/usage/api.rst index 1cc8645..5f86cea 100644 --- a/docs/usage/api.rst +++ b/docs/usage/api.rst @@ -55,16 +55,22 @@ API overview Compiles source code into interpretable byte code with ``mode='function'``. - :param p: (required). - :param body: (required). - :param name: (required). - :param filename: (required). - :param globalize: (optional). - :type p: - :type body: + :param p: (required). a string representing the function parameters + :param body: (required). the function body + :param name: (required). the function name + :param filename: (optional). defaults to ``''`` + :param globalize: (optional). list of globals. defaults to ``None`` + :param flags: (optional). defaults to ``0`` + :param dont_inherit: (optional). defaults to ``False`` + :param policy: (optional). defaults to ``RestrictingNodeTransformer`` + :type p: str or unicode text + :type body: str or unicode text :type name: str or unicode text :type filename: str or unicode text - :type globalize: + :type globalize: None or list + :type flags: int + :type dont_inherit: int + :type policy: RestrictingNodeTransformer class :return: byte code The globalize argument, if specified, is a list of variable names to be