Skip to content

.wait return self so it can be used with method-chaining #379

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

Merged
merged 4 commits into from
Feb 8, 2023

Conversation

eriknw
Copy link
Member

@eriknw eriknw commented Feb 2, 2023

I've wanted method chaining like this for wait a few times in the past few months.

@coveralls
Copy link

coveralls commented Feb 2, 2023

Coverage Status

Coverage: 99.48% (+0.0001%) from 99.48% when pulling 92da690 on eriknw:chain_wait into ed6f3ba on python-graphblas:main.

@eriknw
Copy link
Member Author

eriknw commented Feb 3, 2023

This raises the question whether we should do the same for build, clear, and/or resize.

@eriknw
Copy link
Member Author

eriknw commented Feb 4, 2023

Nevermind, expressions shouldn't (and don't) have build/clear/resize, so these shouldn't return self. expr.wait() doesn't actually modify the object, so having val = expr.wait() can be a nice shorthand for val = expr.new().wait().

@eriknw eriknw merged commit 1bbce69 into python-graphblas:main Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants