Almenon / Almenon/AREPL-backend

add handler for tuple

Đang mở
#87 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement good first issue help wanted python
Ngôn ngữ chính
Python
Star
14
Fork
8
Merge trung bình
4 ngày 19 giờ
Pull request đã merge (30 ngày)
4

Mô tả

add the handler to https://github.com/Almenon/AREPL-backend/blob/master/python/arepl_custom_handlers.py

```python
from collections import namedtuple
Person = namedtuple('Person', 'first_name last_name zip_code')
p1 = Person('Joe', 'Schmoe', '93002')
print(dir(p1))
print(p1.__repr__)
```

Named tuples are not represented well in the variable viewer - the important part of the tuple is the py/seq and py/newargs isn't really necessary.

**vars**:
```
-{
Person: -{
py/type: "__main__.Person"
},
p1: -{
py/object: "__main__.Person",
py/newargs: -{
py/tuple: +[3 items]
},
py/seq: -[
"Joe",
"Schmoe",
"93002"
]
}
}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.