summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2015-10-31 15:01:08 +0500
committerClaude Paroz <claude@2xlibre.net>2015-11-02 20:09:21 +0100
commit0a26121797b5e0aa07ada07fe1577a79d3853c40 (patch)
tree2c19e8bb72ab937225804c9aa0a0f6b4693c311e /docs/ref
parent03c6ad7ad44032206a8780f74c693d16ca1f1a37 (diff)
Refs #25629 -- Added `arity` class attribute to `Func` expressions
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/expressions.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt
index 87c3108509..98ba323171 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -252,6 +252,15 @@ The ``Func`` API is as follows:
A class attribute that denotes the character used to join the list of
``expressions`` together. Defaults to ``', '``.
+ .. attribute:: arity
+
+ .. versionadded:: 1.10
+
+ A class attribute that denotes the number of arguments the function
+ accepts. If this attribute is set and the function is called with a
+ different number of expressions, ``TypeError`` will be raised. Defaults
+ to ``None``.
+
The ``*expressions`` argument is a list of positional expressions that the
function will be applied to. The expressions will be converted to strings,
joined together with ``arg_joiner``, and then interpolated into the ``template``