Closed liamhuber closed 9 months ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
After @samwaseda's addition (#185), I start to wonder if this is actually something that would be nice to have generically available in
snippets
?
Yes, I was about to post this comment, but then also thought since it's only used in the context of channels and it's anyway not visible to the user, I think we can postpone the discussion for now. As soon as we see a potential merit to have it in snippets, we can easily move it.
The original motivation was to get the non-data data working better with
h5io
, but I actually like the singleton better than using a raw class. Also theis
comparisons all keep working, since it's literally the same instance.Defining
__reduce__
allows pickle to get back the exact same global instance defined alongside the singleton class.After @samwaseda's addition (#185), I start to wonder if this is actually something that would be nice to have generically available in
snippets
?