On Wed, Feb 17, 2021 at 11:13:08AM +1300, Greg Ewing wrote:
> On 17/02/21 7:10 am, Steven D'Aprano wrote:
> >"It's Greek letter, like pi that you may remember from maths
> >class. In some technical computer science, the Greek L, lambda, is used
> >as the symbol for functions."
>
> The most accurat
Ned Batchelder writes:
> "lambda" is unnecessarily obscure.
And it should be. It's really only useful as an argument. There's no
advantage to
foo = (x) -> 1
vs.
def foo(x): return 1
except a couple of characters. So what currently looks like
some_list.sort(key=lambda e: e[3].
On 16.02.2021 23:13, Greg Ewing wrote:
> On 17/02/21 7:10 am, Steven D'Aprano wrote:
>> "It's Greek letter, like pi that you may remember from maths
>> class. In some technical computer science, the Greek L, lambda, is used
>> as the symbol for functions."
>
> The most accurate answer seems to be
On Wed, Feb 17, 2021 at 01:03:40AM +0400, Abdulla Al Kathiri wrote:
> From Wikipedia:
> "The term originated as an abstraction of the sequence: single,
> couple/double, triple, quadruple, quintuple, sextuple, septuple,
> octuple, ..., n‑tuple, …"
And that's so obvious in hindsight. Thank you.
On 17/02/21 7:10 am, Steven D'Aprano wrote:
Its no more "magic" than tuple, deque, iterator,
coroutine, ordinal, modulus, etc, not to mention those ordinary English
words with specialised jargon meanings like float, tab, zip, thread,
key, promise, trampoline, tree, hash etc.
Actually, I think i
On 17/02/21 7:10 am, Steven D'Aprano wrote:
"It's Greek letter, like pi that you may remember from maths
class. In some technical computer science, the Greek L, lambda, is used
as the symbol for functions."
The most accurate answer seems to be "Because somebody made
a mistake transcribing a mat
From Wikipedia:
"The term originated as an abstraction of the sequence: single, couple/double,
triple, quadruple, quintuple, sextuple, septuple, octuple, ..., n‑tuple, …"
> On 16 Feb 2021, at 10:10 PM, Steven D'Aprano wrote:
>
> And I still
> don't know where the word comes from in the first p
On Tue, Feb 16, 2021 at 11:38:33AM -0500, Ned Batchelder wrote:
> "lambda" is unnecessarily obscure.
>
> Beginner: "why is it called lambda?"
>
> Teacher: "Don't worry about it, just use it to define a function"
That's a bad answer. A better answer that is more appropriate for nearly
everyone
On Tue, 16 Feb 2021 at 16:40, Ned Batchelder wrote:
>
> "lambda" is unnecessarily obscure.
>
> Beginner: "why is it called lambda?"
>
> Teacher: "Don't worry about it, just use it to define a function"
>
> I'm not taking a side on whether to change Python, but let's please not
> lose sight of just
"lambda" is unnecessarily obscure.
Beginner: "why is it called lambda?"
Teacher: "Don't worry about it, just use it to define a function"
I'm not taking a side on whether to change Python, but let's please not
lose sight of just how opaque the word "lambda" is. People who know the
background
On Tue, Feb 16, 2021 at 04:43:11PM +0100, Sven R. Kunze wrote:
> >>> obj = lambda: 0
>
> to define an anomyous object without the need to define a class first
> (speaking of brevity).
>
>
> "Why?", you may ask. The reason is that:
>
> >>> obj = object()
>
> does not create an instance of obj
On 15.02.21 22:42, Greg Ewing wrote:
On 16/02/21 6:29 am, Guido van Rossum wrote:
I can sympathize with trying to get a replacement for lambda, because
many other languages have jumped on the arrow bandwagon, and few
Python first-time programmers have enough of a CS background to
recognize the
Steven D'Aprano writes:
> lambda a, b, c: a+b*c
> (a, b, c) -> a+b*c
Of course, the mathematicians' spelling would be
(a, b, c) |-> a+b*c
(Don't bother throwing things, I'm already a 5km down the road.)
___
Python-ideas mailing list -- p
On 16/02/2021 05:45, Christopher Barker wrote:
Still OT ...
But I do think you need to consider not just your editor -- if
anyone else is going to read your code.
They're not (in any universe I can imagine).
Exactly -- the most important thing about style is that it be
consist
On 15/02/2021 19:47, Mike Miller wrote:
On 2021-02-13 14:33, Christopher Barker wrote:
On Fri, Feb 12, 2021 at 1:00 AM Brendan Barnwell
mailto:brenb...@brenbarn.net>> wrote:
The only thing that would be better than lambda is a
less confusing
keyword.
There seems to be a fre
15 matches
Mail list logo