Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

docs: added a few more comments about disco.func.reduce2

  • Loading branch information...
commit 742e81496eeea513fa571c29b679ee21dca47aaf 1 parent 0fecab5
Ville Tuulos authored
Showing with 6 additions and 1 deletion.
  1. +1 −1  doc/releases.rst
  2. +5 −0 lib/disco/core.py
View
2  doc/releases.rst
@@ -45,7 +45,7 @@ New features
- Constructor accepts unsorted key-value pairs.
- Option (``unique_items=True``) to remove duplicates from inputs automatically.
- ``unique_values()`` iterator.
- - Alternative signature for reduce: Reduce can now ``yield`` key-value pairs instead of calling ``out.add()``.
+ - Alternative signature for reduce: Reduce can now ``yield`` key-value pairs (or return an iterator) instead of calling ``out.add()`` (see :func:`disco.func.reduce2`).
- Enhanced Java support added as a Git submodule under ``contrib/java-ext``
(`Thanks to Ryan Maus <http://github.com/ryan-maus/disco-java-ext>`_).
- Disk space monitoring for DDFS added to the Web UI.
View
5 lib/disco/core.py
@@ -516,6 +516,11 @@ class JobDict(util.DefaultDict):
:param reduce: If no reduce function is specified, the job will quit after
the map phase has finished.
+ *Added in version 0.3.1*:
+ Reduce supports now an alternative signature,
+ :func:`disco.func.reduce2` which uses an iterator instead
+ of ``out.add()`` to output results.
+
*Changed in version 0.2*:
It is possible to define only *reduce* without *map*.
For more information, see the FAQ entry :ref:`reduceonly`.
Please sign in to comment.
Something went wrong with that request. Please try again.