summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxi <xi@18f92427-320e-0410-9341-c67f048884a3>2009-08-30 00:04:52 +0000
committerxi <xi@18f92427-320e-0410-9341-c67f048884a3>2009-08-30 00:04:52 +0000
commit41efc9145e91dbcd7a331842d11f35bf032feae4 (patch)
treeaf9ed7e7d8960943c12f04c2e0f80308a92be79b
parent27c97f05195b6461743eba45c79befcac51663d7 (diff)
downloadpyyaml-41efc9145e91dbcd7a331842d11f35bf032feae4.tar.gz
Fixed sorting of dict.keys() generator.
git-svn-id: http://svn.pyyaml.org/pyyaml/trunk@359 18f92427-320e-0410-9341-c67f048884a3
-rw-r--r--lib3/yaml/emitter.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib3/yaml/emitter.py b/lib3/yaml/emitter.py
index 5c99d2f..8947d04 100644
--- a/lib3/yaml/emitter.py
+++ b/lib3/yaml/emitter.py
@@ -579,8 +579,7 @@ class Emitter:
return tag
handle = None
suffix = tag
- prefixes = self.tag_prefixes.keys()
- prefixes.sort()
+ prefixes = sorted(self.tag_prefixes.keys())
for prefix in prefixes:
if tag.startswith(prefix) \
and (prefix == '!' or len(prefix) < len(tag)):