Serialize a dict with non-orderable keys
未关闭
- 主要语言
- Python
- 星标
- 734
- 派生
- 412
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 8
描述
It seems that it is not possible to serialize a dict which a non-orderable keys:
```python
from ipykernel.serialize import serialize_object
serialize_object({'A': 1, 2: 2})
File "...\ipykernel\serialize.py", line 85, in serialize_object
for k in sorted(obj):
TypeError: '<' not supported between instances of 'int' and 'str'
```
Is ordering the keys mandatory to serialize the dict? (sorry if that is a dumb question)
贡献指南
评估
这个 Issue 还没有评估数据。