diff options
author | Raymond Hettinger <python@rcn.com> | 2004-05-22 19:37:21 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-05-22 19:37:21 (GMT) |
commit | ddc819c9643dd5d47a940760b88d8aa3262fddf6 (patch) | |
tree | 977e24c43d3364df45e68050fcaa393c3c7764b7 /Lib | |
parent | e36894da3a3fb41b104207d4baa52ce9341865d2 (diff) | |
download | cpython-ddc819c9643dd5d47a940760b88d8aa3262fddf6.zip cpython-ddc819c9643dd5d47a940760b88d8aa3262fddf6.tar.gz cpython-ddc819c9643dd5d47a940760b88d8aa3262fddf6.tar.bz2 |
Make sure sets are printed in sorted order
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/repr.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/repr.py b/Lib/repr.py index 7c0016b..8a86682 100644 --- a/Lib/repr.py +++ b/Lib/repr.py @@ -62,9 +62,11 @@ class Repr: return self._repr_iterable(x, level, header, '])', self.maxarray) def repr_set(self, x, level): + x = sorted(x) return self._repr_iterable(x, level, 'set([', '])', self.maxset) def repr_frozenset(self, x, level): + x = sorted(x) return self._repr_iterable(x, level, 'frozenset([', '])', self.maxfrozenset) |