Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.
Steven D'Aprano
steven at REMOVE.THIS.cybersource.com.au
Wed Feb 17 19:37:15 EST 2010
On Thu, 18 Feb 2010 11:46:52 +1300, Lawrence D'Oliveiro wrote:
> In message <hlhdsi$2pn$1 at theodyn.ncf.ca>, cjw wrote:
>
>> Aren't lambda forms better described as function?
>
> Is this a function?
>
> lambda : None
>
> What about this?
>
> lambda : sys.stdout.write("hi there!\n")
Of course they are; the first is a function that takes no arguments and
returns None, and the second is a function that takes no arguments,
returns None, and has a side-effect of writing "hi there\n" to stout.
But I imagine you already know that, so I'm not really sure I understand
the point of your (rhetorical?) question.
--
Steven
More information about the Python-list
mailing list