-
Notifications
You must be signed in to change notification settings - Fork 90
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
Use b.core instead of b.r.core. #909
Conversation
Blocks have an r property and a core property. Both functions just look up the chain of ancestors of the block to find the core and reactor. It's unnecessary to go all the way up to the reactor just to then grab the core off of it.
Basically acting on the note in this docstring: Lines 173 to 181 in 646f23d
Can't completely remove Line 737 in 646f23d
|
I love it! Can we remove the comment you link on line ~173 now? |
I would like to remove that entire function, but we still have one case of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are good changes.
With regards to your comment:
Can't completely remove b.r yet because it's used to get active nuclides from reactor blueprints here:
Is there a reason why we want to remove b.r
completely? I agree that, in the cases you changed b.r.core
-> b.core
, it makes sense because it avoids unnecessary computation. But I think that b.r
could still be useful in the API.
Plus, if we're trying to avoid changes to the API, I would view that as an unnecessary change to the API.
Just a thought.
I agree that removing
So that's why I thought it might be desirable to remove it. But as long as it's being used, and it's not hurting anything, it makes more sense to leave it in for continuity. |
Description
Blocks have an
r
property and a core property. Both functions just look up the chain of ancestors of the block to find thecore
andreactor
. It's unnecessary to go all the way up to thereactor
just to then grab thecore
off of it.Checklist
doc/release/0.X.rst
) are up-to-date with any bug fixes or new features.doc
folder.setup.py
.