summaryrefslogtreecommitdiff
path: root/doc/user/parseflags.in
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/parseflags.in')
-rw-r--r--doc/user/parseflags.in16
1 files changed, 4 insertions, 12 deletions
diff --git a/doc/user/parseflags.in b/doc/user/parseflags.in
index d65e5b8..2f4bea5 100644
--- a/doc/user/parseflags.in
+++ b/doc/user/parseflags.in
@@ -61,9 +61,7 @@
<file name="SConstruct" printme="1">
env = Environment()
d = env.ParseFlags("-I/opt/include -L/opt/lib -lfoo")
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
@@ -102,9 +100,7 @@
<file name="SConstruct" printme="1">
env = Environment()
d = env.ParseFlags("-whatever")
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
@@ -130,9 +126,7 @@
<file name="SConstruct" printme="1">
env = Environment()
d = env.ParseFlags(["-I/opt/include", ["-L/opt/lib", "-lfoo"]])
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
@@ -159,9 +153,7 @@
<file name="SConstruct" printme="1">
env = Environment()
d = env.ParseFlags(["!echo -I/opt/include", "!echo -L/opt/lib", "-lfoo"])
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)