Terrence Brannon <[EMAIL PROTECTED]> wrote:
>
>Now, I improved this function this way:
>
>def calc_profit(std_clicks, vip_clicks, ad_rate=200,
>upline_status=None):
>    clicks = {}
>    clicks['std'] = std_clicks
>    clicks['vip'] = vip_clicks

You can also write it this way.
    clicks = {
        'std': std_clicks,
        'vid': vip_clicks
    }

>I know there is something like *args, or **args, but since
>docs.python.org is down, I cant check.

The problem with using **args is that you can no longer pass your
parameters positionally.  Callers of calc_profit would have to use named
parameters.  It also makes your default arguments a bit less natural.
-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to