Hi all,

I vote for the idea and I think it would be better to return a list of named
tuples (not sure if it can be used over xml rpc or other rpc).

Named tuples have the same memory footprint as normal tuples and gives class
attribute like functionality.

Eg.

Party=namedtuple('Party', 'name code foo bar')
party1=Party(name='b2ck', code=2,)

and we can access attributes by

party1.name

and its easy to convert to and from dictionary

party1.as_dict()

party2 = Party(**d)

my 2 c

Thanks,

Sharoon Thomas,
Business Analyst & ERP Consultant,
--Sent from Google android

On 6 Aug 2010 16:20, "Cédric Krier" <[email protected]> wrote:

Hi,

With nicoe, we talked about a possible improvement for the read method.
For now, the read method returns a list of dictionaries where the keys are
the
field name. In fact it is not very efficient because dict cost a lot and the
column names are duplicated.
I think this can also improve the communication between the client and the
server.
But of course this will break compatibility with external scripts and
modules.

--
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

-- 
[email protected] mailing list

Reply via email to