Closed ljarosch closed 1 week ago
Since repr()
is intended to return actual code that recreates an object (https://docs.python.org/3/library/functions.html#repr), I would even consider the current behavior a bug, as information would be missing. Hence, your PR would be welcome.
When adding custom annotations to an
AtomArray
, they are not displayed in therepr()
of that array. I think this is because the annotations are hardcoded in the__repr__
method ofAtom
.Showing all annotations would make it more straightforward to interactively do structural analysis, especially in a Notebook context where you frequently print atom arrays.
Below is a suggestion for a potential fix. If this would be an interesting feature to be added to Biotite I'm happy to make a PR.