Details
-
Type:
Improvement
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: utils
-
Labels:
-
Story Points:3
-
Epic Link:
-
Sprint:AP S18-2, AP S18-3
-
Team:Alert Production
Description
We frequently want to implement a class's __str__ or __repr__ methods in terms of its operator<<. The current approach has led to a fair amount of code duplication throughout the stack.
Once a function template that takes a printable object and returns a string is available, explicit wrappers for operator<< should be rewritten to use it.
Attachments
Issue Links
- relates to
-
DM-9869 Add guidelines for useful stringification to DM Pybind11 Style Guide
- Done
Hi Pim Schellart [X], can you review this refactoring of some of the pybind11 code? It's about 100 lines across 4 packages. Thanks!
Edit: PR is lsst/utils#47 and references therein.