Repository navigation
[skip-ci][rfile] Add RFile python doc - #23633
Open
silverweed wants to merge 1 commit into
Open
silverweed wants to merge 1 commit into
silverweed wants to merge 1 commit into
Conversation
vepadulano
requested changes
Oct 7, 2026
vepadulano
left a comment
Member
There was a problem hiding this comment.
Thanks a lot! A few comments from my side.
| \code{.py} | ||
| # Reading an object from file. Note that Get will return None if no object is stored under the given path. | ||
| with ROOT.Experimental.RFile.Open("myfile.root") as file: | ||
| myHisto = file.Get("myHisto") |
Member
There was a problem hiding this comment.
Just a side note, other Python interface e.g. the dictionary have a get method which raises error by default and optionally returns a default argument which could be None e.g. get("mykey", None).
Contributor
Author
There was a problem hiding this comment.
This is currently the behavior on the C++ side; if we strongly believe we should change it we should change it for both languages, but I'd avoid having it behave differently. We still have a bit of time to decide before moving RFile out of Experimental.
silverweed
force-pushed
the
rfile_doc_py
branch
from
October 7, 2026 11:56
e127376 to
a3cbd58
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.