Review: Needs Fixing no test, review

Hi,

Thanks for your changes.

You introduced a bug in your revision 53, you can't do that:

 3122   + def case_reset(self, cr, uid, ids, context=None, *args):

The keyword arguments should always be after the positional arguments.
Your method will be parsed correctly, but if you try to call it using the 
keyword and some extra args:

    case_reset(cr, uid, ids, context={}, arg1, arg2)

You'll have a syntax error:

    SyntaxError: non-keyword arg after keyword arg

I think that the only way to have a keyword argument with *args is:

    def case_reset(self, cr, uid, ids, *args, **kwargs):
        context = kwargs.get('context')
        

-- 
https://code.launchpad.net/~openerp-community/openerp-mgmtsystem/nc-extend/+merge/140259
Your team OpenERP Community is subscribed to branch 
lp:~openerp-community/openerp-mgmtsystem/nc-extend.

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

Reply via email to