Skip to content

Instantly share code, notes, and snippets.

@jml
Created September 2, 2015 13:45
Show Gist options
  • Select an option

  • Save jml/fda88f8c80efecb50bbc to your computer and use it in GitHub Desktop.

Select an option

Save jml/fda88f8c80efecb50bbc to your computer and use it in GitHub Desktop.
python 3.3 + pyrsistent
(Pdb) new_dict
pmap({'': '\x16)\x16\x11\x12\x16\x12\x16)\x06\x06\x11\x06\x11\x16\x12)\x12)\x06\x06)\x12\x12\x16)\x16\x12)\x12\x11\x11\x11\x12\x11\x11\x12\x06\x06', 'Zı': ')\x11\x12\x12\x06\x06\x12)))\x12\x06)\x16\x11\x11\x06\x11\x12\x16\x11\x06\x11\x16\x16', 'task_level': pvector([47, 633, 484, 681, 219, 27, 402, 525, 1812, 470, 523, 1]), 'MZMÖZ#ÖÖ': ')\x12\x11\x16\x06\x12\x11\x16\x06)\x11\x12)\x11\x12\x06\x06\x11\x12\x12\x06\x11)\x16\x11\x06\x16\x16\x11\x06))\x12)\x12\x16\x11\x12\x06\x11\x06\x12)\x06\x06))\x11\x06\x06\x12\x12)\x16\x12))', 'reason': 'Éo\t\tÉ\toÉ\toÉÉÉ\tooo\t\t\tÉoÉoÉoooo\t\t\tÉ', '<': ')\x06\x12\x16\x06\x06)\x16)\x12\x12\x16\x11\x06\x11\x12\x06)\x16\x06\x12\x12\x11\x06\x12\x16)\x12\x06\x11\x06\x16\x11\x16', '<ZÝııÝ': ')\x16\x16\x12\x06\x12))\x11\x11\x16\x16)\x11)\x06\x16)\x12\x16\x16)\x11\x11\x16\x12)', 'ÖıÝıZ##ıÝÖ#': '\x06\x06))\x11\x16\x11\x06\x16\x06\x11\x06\x11\x16\x16\x11\x12\x11\x11', 'action_status': 'failed', '#': ')\x06)\x06\x11\x16\x16\x12', 'exception': '¶q3\ng\x8aāG\x17¶¹GGXāĕ\x8a\n²E\x0c¹g\x8a0\x0c\x8a\x0c\x17\x8aEG\x8aG\x01g0', 'MMM<ÝÝÝZ<': '\x11\x16\x11\x06\x11\x12\x11\x16\x11\x06\x16)\x12))\x11\x12\x06\x16\x12))\x12\x11\x11\x06\x16\x16\x11\x16\x11)\x12\x11))\x11\x06', 'MıZ<Z<Öıı<#ÝıMı': '\x06\x12\x06)\x06)\x16\x06\x06)\x12\x06)))\x11\x12\x12)\x06\x11\x06', 'Z#ı': '\x11\x16)\x12\x06\x12\x06)\x06)\x06\x11\x12\x16', '<ı': '\x11)\x12)\x11\x06\x16\x12\x12\x06)\x16)\x11\x11\x11\x11)\x16\x11\x11\x16', 'ÝÝÝÝ': ')\x11\x16\x16\x16\x06\x11\x06\x06\x16)\x06\x11)\x06\x16\x06\x12\x16\x16\x16\x11\x06\x12)\x06\x12\x12\x06\x16', 'ı<': '\x16\x06\x16\x11)\x12\x11\x06))\x12\x06\x06)', 'Ý': '\x12\x11\x06\x06\x06', 'MÝ##ıÖÝ': '\x06\x16\x16\x16\x16', '<ÝÝ': '\x12\x11\x06)\x12', 'timestamp': 0.0, 'ı<ÖÝı': ')\x12\x06\x16)\x11\x11)\x16', 'task_uuid': UUID('ca366e17-4f21-bed5-b697-ee2fe3614c18')})
(Pdb) new_fields
{'task_level': IntPVector([4]), 'action_type': 'ƥ\u2001\n\x97²q\x97', 'task_uuid': UUID('ca366e17-4f21-bed5-b697-ee2fe3614c18')}
(Pdb) 'action_type' in new_dict.update(new_fields)
False
(Pdb) xs
{'task_level': IntPVector([4]), 'action_type': 'ƥ\u2001\n\x97²q\x97', 'task_uuid': UUID('ca366e17-4f21-bed5-b697-ee2fe3614c18')}
(Pdb) xs == new_fields
True
(Pdb) 'action_type' in new_dict.update(xs)
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment