Serialize a dict with non-orderable keys
Đang mở
- Ngôn ngữ chính
- Python
- Star
- 734
- Fork
- 412
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 8
Mô tả
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)
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.