Skip to content

Commit

Permalink
Expand documentation of callback/result properties
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Jan 16, 2016
1 parent a4ce62f commit 2fca6a9
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions executor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Programmer friendly subprocess wrapper.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: January 14, 2016
# Last Change: January 16, 2016
# URL: https://executor.readthedocs.org

"""
Expand Down Expand Up @@ -675,7 +675,13 @@ def async(self):

@writable_property
def callback(self):
"""Optional callback used to generate the value of :attr:`result`."""
"""
Optional callback used to generate the value of :attr:`result`.
The :attr:`callback` and :attr:`result` properties were created for use
in command pools, where it can be useful to define how to process
(parse) a command's output when the command is constructed.
"""

@mutable_property
def capture(self):
Expand Down Expand Up @@ -983,10 +989,9 @@ def result(self):
"""
The result of calling the value given by :attr:`callback`.
If the command hasn't been started yet :func:`start()` is called
automatically.
If :attr:`callback` isn't set :data:`None` is returned.
If the command hasn't been started yet :func:`start()` is called. When
the command hasn't finished yet func:`wait()` is called. If
:attr:`callback` isn't set :data:`None` is returned.
"""
if self.callback:
if not self.is_finished:
Expand Down

0 comments on commit 2fca6a9

Please sign in to comment.