summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples/store-gae/fruits-catalog.py
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-10-25 03:18:16 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-10-25 03:18:16 +0000
commita2a2cb76e9582af32b6803be7fa99af074dc04ae (patch)
treed0ef504321e72fe16afd23f385f20386530f5dfc /sca-cpp/trunk/samples/store-gae/fruits-catalog.py
parent0dd33c3859618f3a385583d7344230f0e1eb1004 (diff)
Support python method invocation style on references, ref.func(...) in addition to ref('func', ...). Minor cleanup of the various samples, renamed gettotal to total and getcatalog to items, for consistency with the python sample.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1026939 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/samples/store-gae/fruits-catalog.py')
-rw-r--r--sca-cpp/trunk/samples/store-gae/fruits-catalog.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sca-cpp/trunk/samples/store-gae/fruits-catalog.py b/sca-cpp/trunk/samples/store-gae/fruits-catalog.py
index ab599e8400..4b2baca2ff 100644
--- a/sca-cpp/trunk/samples/store-gae/fruits-catalog.py
+++ b/sca-cpp/trunk/samples/store-gae/fruits-catalog.py
@@ -18,10 +18,10 @@
# Catalog implementation
def items(converter, currencyCode):
- code = currencyCode()
+ code = currencyCode.eval()
def convert(price):
- return converter("convert", "USD", code, price)
- symbol = converter("symbol", code)
+ return converter.convert("USD", code, price)
+ symbol = converter.symbol(code)
return (
(("'name", "Platano"), ("'currencyCode", code), ("'currencySymbol", symbol), ("'price", convert(2.99))),
(("'name", "Banana"), ("'currencyCode", code), ("'currencySymbol", symbol), ("'price", convert(3.55))),