openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #04164
Re: Style: dictionaries
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
Follow ups
References