https://jira.lsstcorp.org/browse/DM-5643 adds a method to convert PropertyList to a nested dict. There’s some discussion on github of the desirability of this approach, and I’d like to move it here.
If we started now, we’d never have designed PropertyList the way it is now, with an API inconsistent with dict (e.g. a names() method not keys). However, there was pushback to simply making PropertyList quack like a dict as this has been tried by various people and it isn’t as simple as it might seem.
Do or should we have plans to do some or all of:
- retiring PropertySet/List in favour of some new class
- doing a “proper” rewrite to make them fully pythonic (stealing ideas from e.g.
astropy.io.fits.Header
) - providing a way to make the pythonic interfaces visible transparently from python, while preserving the underlying C++ interfaces (which are rarely used, certainly in new code)
DM-5643 is intended to provide a way to play better with astropy so I’m not trying to derail it, but it isn’t the final solution.