Message 400182 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
Here's pure python code for expirmentation:

    from marshal import dumps, loads

    def marshal_set(s):
        return dumps(sorted((dumps(value), value) for value in s))

    def unmarshal_set(m):
        return {value for dump, value in loads(m)}

    def test(s):
        assert unmarshal_set(marshal_set(s)) == s
        
    test({("string", 1), ("string", 2), ("string", 3)})