ipython / ipython/traitlets

Better introspection functions: info/repr

オープン
#459 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
653
フォーク
217
平均マージ
2日 21時間
マージ済み PR(30日)
2

説明

Currently, the `info()` method of container / dict traits only use the default `Instance` implementation, leading to rather uninformative information when there are restrictions on the elements, e.g. with a complex structure along the lines of:

```py
trait = Tuple((
CFloat(33),
Unicode('default', allow_none=True),
List(Int(0), min_length=3),
))
```
the info string will simply be `'a tuple'`.

Separately, it would be nice if the base trait types included a `__repr__`, so that a trait could be introspected without having to refer to the source (especially useful for traits constructed dynamically).

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。