Message400186
| Author | rhettinger |
|---|---|
| Recipients | FFY00, brandtbucher, jefferyto, methane, obfusk, pablogsal, rhettinger, serhiy.storchaka |
| Date | 2021-08-24.00:19:22 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1629764362.6.0.501440196345.issue37596@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
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)}) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2021-08-24 00:19:22 | rhettinger | set | recipients: + rhettinger, methane, serhiy.storchaka, pablogsal, brandtbucher, FFY00, jefferyto, obfusk |
| 2021-08-24 00:19:22 | rhettinger | set | messageid: <1629764362.6.0.501440196345.issue37596@roundup.psfhosted.org> |
| 2021-08-24 00:19:22 | rhettinger | link | issue37596 messages |
| 2021-08-24 00:19:22 | rhettinger | create | |