Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Here's pure python code for experimentation: from marshal import dumps, loads def marshal_set(s): return dumps(sorted(s, key=dumps)) def unmarshal_set(m): return frozenset(loads(m)) def test(s): assert unmarshal_set(marshal_set(s)) == s test({("string", 1), ("string", 2), ("string", 3)}) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37596> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com