The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: Terry Reedy <tjre...@udel.edu>
Date: Wed, 13 May 2009 19:08:50 -0400
Local: Wed, May 13 2009 7:08 pm
Subject: Re: [Python-ideas] Default arguments in Python - the return - running out of ideas but...
Bruce Leban wrote: There is a proposal, which I thought was accepted in principle, to make > Here's what I'd like: > def myfunc(a, b, c = *lambda: expression): > The use of the lambda keyword here makes the scope of any variables in '* seq' valid generally, not just in arg-lists. to mean 'unpack the sequence'. * (lambda:1,2)() would then be valid, and without the call, would be a runtime, not syntax error. Other than that ;0(, it would be an interesting idea. > __unset = object() tjr > __default = lambda: expression > def mfunc(a, b, c = __unset): > if c == __unset: > c = __default() > stuff _______________________________________________ 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.
| ||||||||||||||