Docstring for deliver should describe its return value

Description

It is presumably useful when delivering a promise to know if the delivery was successful or not (where it might be unsuccessful if it was already delivered, perhaps on another thread).

The deliver function seems to currently communicate this by returning a truthy value (the promise itself) on success and a falsy value (nil) on failure. If this is intentional, the docstring should say so so that users can comfortably rely on it.

In Rich elected for the docstring to not describe the return value; I'm not sure if that was a reluctance to fully specify the return value (promise vs nil) even if partially describing it (truthy vs falsy) would be okay.

Environment

None

Activity

Show:

Details

Assignee

Reporter

Labels

Approval

Triaged

Priority

Created October 1, 2014 at 12:11 AM
Updated October 1, 2014 at 12:23 AM