Closed brunoseivam closed 5 years ago
I was holding out for OrderedDict(), which is a pain from extension code. I guess this would be changed later
Also, forgive the late reply. For some reason github didn't Subscribe me to notifications for this issue or the associated PR. I just happened to notice it.
In occurs to me that P4PValue_toList()
could be generalized to take a callable as an optional argument, to be applied recursively to the (sub)lists.
Since this issue was opened, the Value and Type sub-classes in p4p.wrapper
are now used everywhere. So some of the work of handling OrderedDict could be done there.
aa82b578ce7d5c56dfe67a37e3d0ecc7334e2132 allows Value.todict(type=OrderedDict)
. This is in P4P 3.2.0
Currently
Value
has atolist
method. A similartodict
method would be useful for passing the resulting dictionary to a different serializing library.