-
Notifications
You must be signed in to change notification settings - Fork 8
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
Allow the id.setter to take value of None #21
Conversation
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.
Just one comment from me but then I think we can merge this in. Thanks @gonuke!
test/test_basic.py
Outdated
@@ -229,6 +236,7 @@ def test_coords(request, capfd): | |||
|
|||
|
|||
def test_to_vtk(tmpdir_factory, request): | |||
|
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.
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.
A few small thoughts/questions from me @gonuke. Thank you for this improvement!
I moved the ID cleanup to |
Can you elaborate on deleting the |
As far as I know, the |
Ah, yeah I don't think it's possible to delete an object inside an object method. My understanding of invoking It seems the best we can do is invalidate the object and ensure that it fails quickly and gracefully if used beyond the point that |
I didn't think so.... but just wonder about what users will expect from the |
We're sort of limited by the language here, I'd say. So the best we can do is probably provide some additional documentation on what happens to the object at that point.... if we had documentation. For now, an expansion of the |
I was also trying to think about whether |
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 like where we landed with this for now. Thank you @gonuke!
I'll give this a bit in case @paulromano wants to have another look. |
Looks good to me too! Thanks for pinging me on this @pshriwise |
If the
id
value passed to theid.setter
isNone
automatically pick the next available ID