OpenMS / pyopenms-docs

pyOpenMS readthedocs documentation, additional utilities, addons, scripts, and examples.
https://pyopenms.readthedocs.io
Other
42 stars 52 forks source link

Auto generate __str__ for attributes #290

Closed timosachsenberg closed 1 year ago

timosachsenberg commented 2 years ago

Suggested by a user, we could provide automatic str to output attributes and content: Screen Shot 2022-07-08 at 1 41 08 PM

timosachsenberg commented 2 years ago

We could think about ways if we can detect a stream operator on the c++ side.

jpfeuffer commented 1 year ago

By the way, I found this: https://github.com/OpenMS/OpenMS/blob/2bd127070223c54ec146da569cceb8336f6dbb2b/src/pyOpenMS/create_cpp_extension.py#L129

So with a C++ toString() method, this is autogenerated.