diff options
Diffstat (limited to 'doc/user/parseflags.xml')
-rw-r--r-- | doc/user/parseflags.xml | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/doc/user/parseflags.xml b/doc/user/parseflags.xml index c477c98..fd15de7 100644 --- a/doc/user/parseflags.xml +++ b/doc/user/parseflags.xml @@ -60,9 +60,7 @@ <programlisting> 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) @@ -106,9 +104,7 @@ <programlisting> 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) @@ -132,9 +128,7 @@ <programlisting> 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) @@ -161,9 +155,7 @@ <programlisting> 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) |