Repository navigation
Rename STATUS_IGNORED to TASK_STATUS_IGNORED - #353
Merged
Merged
Conversation
The asymmetry in task_status=trio.STATUS_IGNORED is bugging me too much. I gotta change it. What to change it to? task_status=trio.TASK_STATUS_IGNORED is kind of long -- 36 characters -- and likely to make 80-character lines wrap. But the old one was 31 characters, which is already likely to make 80-character lines wrap, and I haven't had any better ideas. I don't want to make it status=STATUS_IGNORED, because then we're claiming the kwarg "status" in every Trio server function, which seems just a little too generic. task_status is more unique and I think better for attaching this special convention to. I thought about task_status=NO_TASK_STATUS, but that feels weird. It's not that the task has no status, it's that the caller is ignoring that status. I guess we could switch to something like status_reporter=trio.NO_STATUS_REPORTER but that's even *longer* (39 characters), and not really any clearer.
Member
Author
|
I guess I'll leave this open for a little while in case anyone comes up with a better suggestion. |
Codecov Report
@@ Coverage Diff @@
## master #353 +/- ##
=======================================
Coverage 99.24% 99.24%
=======================================
Files 87 87
Lines 10436 10436
Branches 728 728
=======================================
Hits 10357 10357
Misses 61 61
Partials 18 18
Continue to review full report at Codecov.
|
Member
Author
|
There's some more discussion in chat starting here: https://gitter.im/python-trio/general?at=5a1ceed4e5ed52e26c98480f |
brettcannon
approved these changes
Dec 5, 2017
njsmith
added a commit
to njsmith/trio
that referenced
this pull request
Dec 25, 2017
njsmith
added a commit
to njsmith/trio
that referenced
this pull request
Dec 25, 2017
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.
The asymmetry in task_status=trio.STATUS_IGNORED is bugging me too much. I
gotta change it.
What to change it to? task_status=trio.TASK_STATUS_IGNORED is kind of
long -- 36 characters -- and likely to make 80-character lines wrap.
But the old one was 31 characters, which is already likely to make
80-character lines wrap, and I haven't had any better ideas.
I don't want to make it status=STATUS_IGNORED, because then we're
claiming the kwarg "status" in every Trio server function, which seems
just a little too generic. task_status is more unique and I think
better for attaching this special convention to.
I thought about task_status=NO_TASK_STATUS, but that feels weird. It's
not that the task has no status, it's that the caller is ignoring that
status. I guess we could switch to something like
status_reporter=trio.NO_STATUS_REPORTER but that's even longer (39
characters), and not really any clearer.