mirror of
https://github.com/python/cpython.git
synced 2025-11-28 06:06:26 +00:00
Now that test_MimeWriter is untabified, do the same here!
This commit is contained in:
parent
a3eebe60dc
commit
08636f08ed
1 changed files with 15 additions and 15 deletions
|
|
@ -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
|
||||||
|
|
||||||
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--
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue