On 29/04/12 20:45 +0200, Albert Cervera i Areny wrote:
> A Diumenge, 29 d'abril de 2012 20:17:25, Cédric Krier va escriure:
> > > Also the fact that some get functions of fields.Function use @classmethod
> > > and others use "standard" functions makes it a bit more complex. Could
> > > we standarize and always use the same mechanism?
> > 
> > Indeed the simplier is the instance method but that is not always the
> > best because it could be better to work on list like when you can do a
> > SQL query to compute all at once.
> 
> Yes, I saw that, but maybe it is simpler to make all functions behave the 
> same 
> way (that is the version that can be optimized). Maybe I need to get used to 
> it, but it seems that it's harder to read the code if each function follows a 
> different scheme. Maybe it's better to always consider you're getting the 
> list 
> of models and that's it.

I don't agree. It is because you can use the right kind of method that
makes the code easier to read.

-- 
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/

Attachment: pgphBIvcSUQk7.pgp
Description: PGP signature

Reply via email to