Skip to content

Commit

Permalink
Clean up examples' API.
Browse files Browse the repository at this point in the history
  • Loading branch information
itamarst committed Aug 4, 2015
1 parent b9b9017 commit 1e798f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions examples/rometrip_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ def visited(self, person):
thing.visited(person)


def honeymoon(family):
def honeymoon(family, destination):
with start_task(action_type="honeymoon", family=family):
rome = Place("Rome, Italy",
[Place("Vatican Museum",
[Place("Statue #1"), Place("Statue #2")])])
for person in family:
rome.visited(person)
destination.visited(person)


honeymoon(["Mrs. Casaubon", "Mr. Casaubon"])
honeymoon(["Mrs. Casaubon", "Mr. Casaubon"],
Place("Rome, Italy",
[Place("Vatican Museum",
[Place("Statue #1"), Place("Statue #2")])]))
12 changes: 6 additions & 6 deletions examples/rometrip_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ def visited(self, person):
thing.visited(person)


def honeymoon(family):
def honeymoon(family, destination):
Message.log(message_type="honeymoon", family=family)
rome = Place("Rome, Italy",
[Place("Vatican Museum",
[Place("Statue #1"), Place("Statue #2")])])
for person in family:
rome.visited(person)
destination.visited(person)


honeymoon(["Mrs. Casaubon", "Mr. Casaubon"])
honeymoon(["Mrs. Casaubon", "Mr. Casaubon"],
Place("Rome, Italy",
[Place("Vatican Museum",
[Place("Statue #1"), Place("Statue #2")])]))

0 comments on commit 1e798f9

Please sign in to comment.