Review: Disapprove

Logic:

1. This will "convert" an active_id of e.g. `None` and convert it for no good 
reason
2. This is not a fix, it just hides the issue under the rug with a nonsensical 
value: either an active_id is needed and we should have one, or no active_id is 
needed and whatever is being evaluated is *wrong*.

Style:
1. It makes no sense to use dict.update to set a single key, even less so by 
passing it a dict, it does not look better or simpler and it is significantly 
slower than just using __setitem__.
2. None should always be tested against with `is`
3. To test that a key does not exist in a dict, `in` should be used
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-574893-bth/+merge/110299
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1-opw-574893-bth.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to