On Mon, Apr 19, 2010 at 9:46 AM, Chris Rebert <span dir="ltr"><<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
It doesn't really make sense to use * in such situations anyway, you<br>
can just do the normal `z = (1,2,3)`</blockquote><div><br>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. <br></div><div> <br>On Mon, Apr 19, 2010 at 9:54 AM, Stephen Hansen <span dir="ltr"><<a href="mailto:apt.shansen@gmail.com">apt.shansen@gmail.com</a>></span>
wrote:<br><div style="font-family: courier new,monospace;">def t(a, *b):</div><div style="font-family: courier new,monospace;"> if not b:</div>
<div style="font-family: courier new,monospace;"> b = (2,3)</div><div style="font-family: courier new,monospace;"> ...<br><span style="font-family: arial,helvetica,sans-serif;"><br>Brilliant! I can live with that. =D</span><br>
def t(a, *b):<br> if not b:<br> b = (2, 4)<br> print a, b<br> <br>t(1)<br>1 (2, 4)<br>t(1, 3, 4)<br>1 (3, 4)<br>t(1, 3, 4, 5)<br>1 (3, 4, 5)<br><br><span style="font-family: arial,helvetica,sans-serif;">Cheers,</span><br style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: arial,helvetica,sans-serif;">Xav</span><br></div></div></div>