Skip to content

Commit 265046d

Browse files
committed
Even more vars.Add() docstring tweaking.
Signed-off-by: Mats Wichmann <[email protected]>
1 parent a7f4ab1 commit 265046d

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

SCons/Variables/__init__.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def _do_add(
113113
) -> None:
114114
"""Create a Variable and add it to the list.
115115
116-
Internal routine, not public API.
116+
This is the internal implementation for :meth:`Add` and
117+
:meth:`AddVariables`. Not part of the public API.
117118
118119
.. versionadded:: 4.8.0
119120
*subst* keyword argument is now recognized.
@@ -157,15 +158,16 @@ def Add(
157158
"""Add a Build Variable.
158159
159160
Arguments:
160-
key: the name of the variable, or a 5-tuple (or list).
161-
If *key* is a tuple, and there are no additional positional
162-
arguments, it is unpacked into the variable name plus the
163-
*help*, *default*, *validator* and *converter keyword args.
164-
If *key* is a tuple and there are additional positional arguments,
165-
the first word of the tuple is taken as the variable name,
166-
and the remainder as aliases.
161+
key: the name of the variable, or a 5-tuple (or other sequence).
162+
If *key* is a tuple, and there are no additional arguments
163+
except the *help*, *default*, *validator* and *converter*
164+
keyword arguments, *key* is unpacked into the variable name
165+
plus the *help*, *default*, *validator* and *converter*
166+
arguments; if there are additional arguments, the first
167+
elements of *key* is taken as the variable name, and the
168+
remainder as aliases.
167169
args: optional positional arguments, corresponding to the
168-
*help*, *default*, *validator* and *converter keyword args.
170+
*help*, *default*, *validator* and *converter* keyword args.
169171
kwargs: arbitrary keyword arguments used by the variable itself.
170172
171173
Keyword Args:
@@ -174,7 +176,7 @@ def Add(
174176
validator: function called to validate the value (default: ``None``)
175177
converter: function to be called to convert the variable's
176178
value before putting it in the environment. (default: ``None``)
177-
subst: if true perform substitution on the value before the converter
179+
subst: perform substitution on the value before the converter
178180
and validator functions (if any) are called (default: ``True``)
179181
180182
.. versionadded:: 4.8.0

0 commit comments

Comments
 (0)