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 還沒有評估資料。