[Python-Dev] PEP 3148 ready for pronouncement
Brian Quinlan
brian at sweetapp.com
Sun May 23 03:21:51 CEST 2010
On May 23, 2010, at 10:06 AM, Jeffrey Yasskin wrote:
> On Sat, May 22, 2010 at 4:12 PM, Brian Quinlan <brian at sweetapp.com>
> wrote:
>> Rename "executor" => "executer"
>
> -1 for consistency with Java.
>
-1 pending an explanation of why "executer" is better
>> Rename "submit" to "apply"
>
> "apply" focuses attention on the function object, while "submit"
> focuses attention, properly I think, on the fact that you're handing
> something to the executor to run. So -1.
-1
>> Rename "done" to "finished"
>
> "done" is nice and short, and I don't think "finished" or "completed"
> will be any less prone to people thinking the task actually ran. So
> -1.
-0
>> Rename "not_finished" to "pending"
>
> +0.5. Doesn't matter that much, but pending is used elsewhere in the
> proposal for this concept. On the other hand, "pending" could be
> thought to refer to the state before "running". Possibly "finished"
> should be renamed to "done" here, since it's described as '"finished",
> contains the futures that completed (finished or were cancelled)',
> which uses "finished" for two different concepts.
I think that using "finished" is bad terminology here.
So +1 to "finished" => "done".
I don't have a preference for "not_done" vs. "pending".
>> Rename "FIRST_COMPLETED" to "ONE_COMPLETED"
>
> "ONE_COMPLETED" could imply that the first result set must contain
> exactly one element, but in fact, if multiple tasks finish before the
> waiting thread has a chance to wake up, multiple futures could be
> returned as done. So -1.
A logician would probably call it "SOME_COMPLETED".
What about "ANY_COMPLETED"? Though I think that "FIRST_COMPLETED"
still reads better.
Cheers,
Brian
More information about the Python-Dev
mailing list