From a2a2cb76e9582af32b6803be7fa99af074dc04ae Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 25 Oct 2010 03:18:16 +0000 Subject: 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 --- sca-cpp/trunk/samples/store-gae/fruits-catalog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sca-cpp/trunk/samples/store-gae/fruits-catalog.py') 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))), -- cgit v1.2.3