← Back to team overview

openerp-community team mailing list archive

Re: Coding Guidlines - long lines

 

I prefer 79 even if it means the odd ugly line.  In OpenERP we must work
across multiple files at once. 79 allows for 4 open editors. But sometimes
it should be broken which pep8 also allows.
On 26/11/2013 3:41 AM, "Jose Antonio Morales" <jose@xxxxxxxxxx> wrote:

> Hello.
>
> I think the same way that Oscar does.
>
> When I saw the PEP8 updates almost cry of happiness, because 79 char is
> too short when you fully follow the pep8 rules, you can see the account
> code and then tell me if 79 char is enough.
>
> The answer is simple is not enough because you would have to cut the code
> lines to follow the PEP8 and this makes your code to be ugly.
>
> I follow the PEP8 rules even in the fields definition and I tell them
> again 79 is not enough.
>
> If you want follow the PEP8 fully 79 is not enough if you want follow the
> PEP8 in some lines(bad way) you can use 79 char.
>
> Use this command pep8 --show-source --show-pep8 for know how many rules
> you are broken.
>
>
> On Mon, Nov 25, 2013 at 1:42 AM, Mario Arias <the.clone.master@xxxxxxxxx>wrote:
>
>> +1  for 79 chars...
>>
>> I am on the road working on my laptop most of the time...
>>
>> Regards,
>> -Mario
>>
>>
>> On Sun, Nov 24, 2013 at 2:48 PM, Franco Tampieri <
>> franco.tampieri@xxxxxxxxxxx> wrote:
>>
>>> I like python pep8 rule, code i much readable on small diplay, so I
>>> agree at 100% to the community approach.
>>>
>>> Regards
>>>
>>> Franco
>>>
>>>
>>>
>>>
>>> Franco Tampieri
>>> System Engineer
>>>
>>>
>>>
>>> >_
>>> abstract.it - +39 06 9294 6938
>>>
>>>
>>>
>>>
>>> Registro Imprese di Napoli 788429 / Cap. Soc. 10.000 Euro I.V.
>>> Avvertenze Legali – D. Lgs. 196/03 Tutela dei dati personali. Le informazioni contenute in questo messaggio
>>> e in ogni eventuale allegato sono riservate e ne è vietata ogni forma di diffusione. Se avete ricevuto questa
>>> comunicazione per errore, Vi preghiamo di informare immediatamente il mittente del messaggio e di eliminare l'e-mail.
>>>
>>>
>>>
>>> 2013/11/24 Leonardo Pistone <leonardo.pistone@xxxxxxxxxxxxxx>
>>>
>>>> I prefer 79 as well.
>>>>
>>>> I also agree with the pep8 idea of not using backslashes, but "using
>>>> Python's implied
>>>>  line continuation inside parentheses, brackets and braces."
>>>>
>>>> OpenERP example:
>>>>
>>>>         'date_order': fields.date(
>>>>             'Date', required=True, readonly=True, select=True,
>>>>             states={
>>>>                 'draft': [('readonly', False)],
>>>>                 'sent': [('readonly', False)]
>>>>             }),
>>>>
>>>> Instead of the long line found in the actual openobject-addons code
>>>>
>>>> l
>>>>
>>>>
>>>> On Sat, Nov 23, 2013 at 4:27 PM, Oscar Alca <oszckar@xxxxxxxxx> wrote:
>>>>
>>>>> http://hg.python.org/peps/rev/fb24c80e9afb#l1.95
>>>>>
>>>>>
>>>>> On Fri, Nov 22, 2013 at 10:38 AM, Sebastien Beau <
>>>>> sebastien.beau@xxxxxxxxxxxxxxx> wrote:
>>>>>
>>>>>> Hi
>>>>>> I also support 79.
>>>>>> When I start on python I was thinking that 79 was not enough. But now
>>>>>> every time I read the code of an OpenERP Module that respect pep8. I really
>>>>>> enjoy it, it's really more readable, so let's stay on 79.
>>>>>>
>>>>>>
>>>>>> 2013/11/22 Stefan <stefan@xxxxxxxx>
>>>>>>
>>>>>>> On 11/22/2013 05:15 PM, Oscar Alca wrote:
>>>>>>>
>>>>>>>> Hello Raphael I also understand the question why the question was
>>>>>>>> rised, also, I do not think that PEP8 Is ambiguous, it says maximum of 100
>>>>>>>> with effective 99 for code mantained by a team, so, we, as a team, are
>>>>>>>> allowed to a maximum of 100.
>>>>>>>>
>>>>>>>
>>>>>>> Hi Oscar,
>>>>>>>
>>>>>>> it does not say 'code maintained by a team', it says "[maintained]
>>>>>>> by a team that can reach agreement on this issue". And as a member of that
>>>>>>> team, I prefer 79 like Alexandre for now.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Stefan
>>>>>>>
>>>>>>> --
>>>>>>> Therp - Maatwerk in open ontwikkeling
>>>>>>>
>>>>>>> Stefan Rijnhart - Ontwerp en implementatie
>>>>>>>
>>>>>>> mail: stefan@xxxxxxxx
>>>>>>> tel: +31 (0) 614478606
>>>>>>> web: http://therp.nl
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Mailing list: https://launchpad.net/~openerp-community
>>>>>>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
>>>>>>> Unsubscribe : https://launchpad.net/~openerp-community
>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~openerp-community
>>>>>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~openerp-community
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Ing. Oscar Alcalá Rivera
>>>>> *312-107-1704 <312-107-1704>* · oszckar@xxxxxxxxx <ozckar@xxxxxxxxx>
>>>>>
>>>>> Paseo de Bugambilias 251 · Villa de alvarez, Colima, CP 28978
>>>>> Tlf: *3123111122 <3123111122>*
>>>>>
>>>>> *Open Source Enthusiast*
>>>>>      [image: twitter] <http://twitter.com/oscarolar> [image: linkedIn]<http://www.linkedin.com/pub/oscar-alcal%C3%A1/3b/a79/922>
>>>>>    [image: Google+]<http://plus.google.com/107659954580035981067/posts>
>>>>>
>>>>>
>>>>> [image: eco] No me imprimas si no es necesario. Protejamos el medio
>>>>> ambiente
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~openerp-community
>>>>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~openerp-community
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~openerp-community
>>>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~openerp-community
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openerp-community
>>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~openerp-community
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openerp-community
>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openerp-community
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Jose Morales
> Senior Developer
> Site: http://vauxoo.com
> Email: j <rsilvam@xxxxxxxxxx>ose@xxxxxxxxxx
> Twitter: @joseamoralesp
> Skype: joseamoralesp
> LPUser: https://launchpad.net/~josemoralesp
> Phone: +58 (426) 310 69 65
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp
>
>

References