From: MRAB <goo...@mrabarnett.plus.com>
Date: Wed, 13 May 2009 23:20:49 +0100
Local: Wed, May 13 2009 6:20 pm
Subject: Re: [Python-ideas] Default arguments in Python - the return - running out of ideas but...
Steven D'Aprano wrote: Well, going back to 'def', it could mean 'deferred until call-time': > On Thu, 14 May 2009 05:18:37 am CTO wrote: >> If you thought not reevaluating function expressions >> Why not just push for some decorators that do this to be included in > Even if a decorator solution can be made to work, it seems to me that > There are work-arounds, of course, but there are perfectly adequate > I'm going to suggest that any syntax should be applied to the formal > By analogy with the use of the unary-* operator, I suggest we use a new > def parrot(a, b, x=[], &y=[], *args, **kwargs): > As a bonus, this will allow for a whole new series of bike-shedding > Tagging a parameter with unary-& but failing to specify a default value > def parrot(&x, &y=[]): > Likewise for unary-& outside of a parameter list. > Bike-shedding away... *wink* def parrot(a, b, x=[], y=def [], *args, **kwargs): You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||