Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Return self from reader read method #495

Open
drewejohnson opened this issue Aug 7, 2023 · 0 comments
Open

ENH Return self from reader read method #495

drewejohnson opened this issue Aug 7, 2023 · 0 comments

Comments

@drewejohnson
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Not related to a problem, but related to separating out readers from things holding the read data - #335

Right now, if a script is doing, e.g.,

import serpentTools
r = serpentTools.ResultsReader(...)
r. read()
# do stuff
r.resdata["colKeff"]

and we then change it such that ResultsReader does not store the read data (see #335), then the script would break because the results reader does not store result data.

I think an intermediate solution would be to return self from r.read and encourage people to use the following pattern

r = serpentTools.ResultsReader(...)
data = r.read()
data.resdata["colKeff"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant