Commit 08636f08 authored by Guido van Rossum's avatar Guido van Rossum

Now that test_MimeWriter is untabified, do the same here!

parent a3eebe60
...@@ -41,7 +41,7 @@ INTERFACE Seller-1; ...@@ -41,7 +41,7 @@ INTERFACE Seller-1;
TYPE Seller = OBJECT TYPE Seller = OBJECT
DOCUMENTATION "A simple Seller interface to test ILU" DOCUMENTATION "A simple Seller interface to test ILU"
METHODS METHODS
price():INTEGER, price():INTEGER,
END; END;
--802spam999 --802spam999
...@@ -71,22 +71,22 @@ KP-Module-Name: BuyerKP ...@@ -71,22 +71,22 @@ KP-Module-Name: BuyerKP
class Buyer: class Buyer:
def __setup__(self, maxprice): def __setup__(self, maxprice):
self._maxprice = maxprice self._maxprice = maxprice
def __main__(self, kos): def __main__(self, kos):
"""Entry point upon arrival at a new KOS.""" """Entry point upon arrival at a new KOS."""
broker = kos.broker() broker = kos.broker()
# B4 == Barry's Big Bass Business :-) # B4 == Barry's Big Bass Business :-)
seller = broker.lookup('Seller_1.Seller', 'B4') seller = broker.lookup('Seller_1.Seller', 'B4')
if seller: if seller:
price = seller.price() price = seller.price()
print 'Seller wants $', price, '... ' print 'Seller wants $', price, '... '
if price > self._maxprice: if price > self._maxprice:
print 'too much!' print 'too much!'
else: else:
print "I'll take it!" print "I'll take it!"
else: else:
print 'no seller found here' print 'no seller found here'
--803spam999-- --803spam999--
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment