changeset 826:420569d71d4d

More comments for the millionaires example.
author Martin Geisler <mg@daimi.au.dk>
date Sun, 13 Jul 2008 15:21:40 +0200
parents 73f6984432b5
children 58c1a0dfbcfc
files apps/millionaires.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/apps/millionaires.py	Sun Jul 13 15:16:00 2008 +0200
+++ b/apps/millionaires.py	Sun Jul 13 15:21:40 2008 +0200
@@ -91,6 +91,12 @@
         # These are called in sequence when self.results_ready is
         # finished. The first callback acts like a barrier and makes
         # all players wait on each other.
+        #
+        # The callbacks are always called with an argument equal to
+        # the return value of the preceeding callback. We do not need
+        # the argument (which is None since self.results_ready does
+        # not return anything), so we throw it away using a lambda
+        # expressions which ignores its first argument.
         results.addCallback(lambda _: runtime.synchronize())
         # The next callback shuts the runtime down, killing the
         # connections between the players.