On Mon, Apr 19, 2010 at 9:46 AM, Chris Rebert <c...@rebertia.com> wrote:

> It doesn't really make sense to use * in such situations anyway, you
> can just do the normal `z = (1,2,3)`


But calling function(1.0, (0.0, 1.0, 0.0)) has been a big pet peeve of mine,
and it looks extremely ugly and, imo, unpythonic.

On Mon, Apr 19, 2010 at 9:54 AM, Stephen Hansen <apt.shan...@gmail.com>wrote:
def t(a, *b):
    if not b:
        b = (2,3)
    ...

Brilliant! I can live with that. =D
def t(a, *b):
    if not b:
        b = (2, 4)
    print a, b

t(1)
1 (2, 4)
t(1, 3, 4)
1 (3, 4)
t(1, 3, 4, 5)
1 (3, 4, 5)

Cheers,
Xav
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to