-
Notifications
You must be signed in to change notification settings - Fork 188
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
Reduce direct use of numerical part id (doc, samples) #4058
Conversation
81a8514
to
1c20ebd
Compare
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.
👍 really good stuff
|
||
""" | ||
check_type_or_throw_except( | ||
_relto, 1, int, "Argument of vs_auto_relate_to has to be of type int.") | ||
# If _relto is of type ParticleHandle, |
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.
none of your business but this variable name is not too descriptive and the underscore is not pep8... just if your over-motivated :)
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 agree, the current variable names in this part of the interface are not as I would like them to be. However, this is true for all member variables of the ParticleHandle
class. I think the idea here is to mirror the core variable but adding a prefixed underscore to not have the variables being exactly the same. I think @RudolfWeeber commented in some PR (that I can't find just know), that he would like to have distinct names for the variables in core and interface respectively. If I am wrong here, sure I can quickly go over the class and "pepify" it a bit.
Part of #4029
Description of changes:
vs_auto_relate_to()
takeParticleHandle
, not just particle idadd_bond()
with a particle id and calling it again with the corresponding particle handle)There are still some places, especially in the
espressomd.observables
, where for now particle ids cannot be omitted, such asParticlePositions
.