← Back to team overview

openerp-community team mailing list archive

Re: CamelCase

 

nice POV Florent,
i dont' like CamelCase but, restricted to class name there's no problems
if I see Capital letter :-) , as you said no search on Class name, so no
extra parameters for grep (maybe a search in super method but ... I
think I never do this type of search ...)

Il 06/04/2014 15:41, Florent ha scritto:
Hello,

through the documentation the only recommendation which is relevant
here is "Follow Python PEP 8":
https://doc.openerp.com/contribute/05_developing_modules/#coding-guidelines

Personally, I use the camel case convention for all the classes inside
my OpenERP addons, it's more natural, and less error-prone . At the
end the class names for the OpenERP ORM are not very significant, they
are not used for registering models, only the "_name" attribute is
important.

Of course the existing addons could keep their current namings, but
the new ones should move to camel case, maybe at the same time they
are moving from "osv.osv" base class to "orm.Model" base class?

It looks a bit weird to me it we keep writing classes with lowercase
with underscore if they depend on orm.Model.

My 2 cents,



---
Questa e-mail è priva di virus e malware perché è attiva la protezione avast! Antivirus.
http://www.avast.com



References