summaryrefslogtreecommitdiffstats
path: root/doc/man/scons.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man/scons.xml')
-rw-r--r--doc/man/scons.xml14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/man/scons.xml b/doc/man/scons.xml
index f61c491..805164c 100644
--- a/doc/man/scons.xml
+++ b/doc/man/scons.xml
@@ -3014,7 +3014,7 @@ function to get at the path name for each Node.</para>
<literallayout class="monospaced">
print(str(DEFAULT_TARGETS[0]))
-if 'foo' in map(str, DEFAULT_TARGETS):
+if 'foo' in [str(t) for t in DEFAULT_TARGETS]:
print("Don't forget to test the `foo' program!")
</literallayout>
</listitem>
@@ -3028,13 +3028,13 @@ list change on on each successive call to the
function:</para>
<literallayout class="monospaced">
-print(map(str, DEFAULT_TARGETS)) # originally []
+print([str(t) for t in DEFAULT_TARGETS]) # originally []
Default('foo')
-print(map(str, DEFAULT_TARGETS)) # now a node ['foo']
+print([str(t) for t in DEFAULT_TARGETS]) # now a node ['foo']
Default('bar')
-print(map(str, DEFAULT_TARGETS)) # now a node ['foo', 'bar']
+print([str(t) for t in DEFAULT_TARGETS]) # now a node ['foo', 'bar']
Default(None)
-print(map(str, DEFAULT_TARGETS)) # back to []
+print([str(t) for t in DEFAULT_TARGETS]) # back to []
</literallayout>
<para>Consequently, be sure to use
@@ -5279,11 +5279,11 @@ arguments may be lists of Node objects if there is
more than one target file or source file.
The actual target and source file name(s) may
be retrieved from their Node objects
-via the built-in Python str() function:</para>
+via the built-in Python <function>str</function> function:</para>
<literallayout class="monospaced">
target_file_name = str(target)
-source_file_names = map(lambda x: str(x), source)
+source_file_names = [str(x) for x in source]
</literallayout>
<para>The function should return