← Back to team overview

openerp-community team mailing list archive

Re: Style: dictionaries

 

Yeah, I think also that looks weird, but don't lose the perspective that
the main thing is to have very good modules functionally and technically
speaking ;)

Style is a plus!

Regards.


2013/12/4 Sandy Carter <sandy.carter@xxxxxxxxxxxxxxxxxxxx>

> I personally like the 2nd, but the point I was raising was in the specific
> case of the __openerp__.py dictionary:
>
> {'name': 'Module Name',
>  'version: '1.0',
>  ...
>  }
>
> While it is perfectly pep8 legal, it looks odd.
>
> The following is also pep8 legal:
>
> {'name': 'Module Name', 'version': '1.0', 'author': 'Author Name',
>  'maintainer': 'Maintainer Name', 'website': 'http://www.example.com',
>  ...
>  }
>
> Regards,
> --
> Sandy
>
> Le 2013-12-04 11:24, Leonardo Pistone a écrit :
>
>> Hi all,
>> I bring to your attention Sandy's review here:
>>
>> https://code.launchpad.net/~camptocamp/stock-logistic-
>> flows/6.1-add-mrp_open_lot_attributes-lep/+merge/196749
>>
>> according to pep8, two styles of indentation are possible. Take for
>> example a dictionary:
>>
>> {'name': 'spam',
>>   'color': 'brown'
>>   }
>>
>> or
>>
>> {
>>      'name': 'eggs',
>>      'color': 'white'
>> }
>>
>> According to the pep8 document and to the pep8 checker, they both work.
>> I personally would accept both.
>>
>> What do you think?
>>
>> Best, Leo
>>
>>
>> _______________________________________________
>> 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
>

References