Almenon / Almenon/AREPL-backend
add handler for tuple
- 主要言語
- Python
- スター
- 14
- フォーク
- 8
- 平均マージ
- 4日 19時間
- マージ済み PR(30日)
- 4
説明
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"
]
}
}
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。