From: Terry Reedy <tjre...@udel.edu>
Date: Wed, 13 May 2009 17:58:46 -0400
Local: Wed, May 13 2009 5:58 pm
Subject: Re: [Python-ideas] Default arguments in Python - the return - running out of ideas but...
MRAB wrote: I had the idea of def f(c=:[]): where ':' is intended to invoke the idea > There's the suggestion that Carl Johnson gave: > def myfunc(a, b, c else []): > or there's: > def myfunc(a, b, c def []): > where 'def' stands for 'default' (or "defaults to"). of lambda, since the purpose is to turn the expression into a function that is automatically called (which is why lambda alone is not enough). So I would prefer c = def [] where def reads 'auto function defined by...'. or c = lambda::[] where the extra ':' indicates that that the function or c = lambda():[], (now illegal), where () is intended to show that the Thinking about it, I think those who want a syntax to indicate that the Terry Jan Reedy _______________________________________________ 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.
| ||||||||||||||