diff options
Diffstat (limited to 'doc/user/parseflags.in')
-rw-r--r-- | doc/user/parseflags.in | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/doc/user/parseflags.in b/doc/user/parseflags.in index 733ee1d..a0ea290 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) |