ipython / ipython/traitlets

Better introspection functions: info/repr

Open
#459 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
653
Forks
217
Avg merge
2d 21h
Merged PRs (30d)
2

Description

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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.