A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/302022.html below:

Replacement for lambda - 'def' as an expression?

Replacement for lambda - 'def' as an expression? Replacement for lambda - 'def' as an expression?en.karpachov at ospaz.ru en.karpachov at ospaz.ru
Tue Sep 6 07:03:48 EDT 2005
On Tue, 06 Sep 2005 12:19:21 +0200
Torsten Bronger wrote:

> "talin at acm dot org" <viridia at gmail.com> writes:
> > Anyway, here's an example, then, of how 'def' could be used:
> >
> > add = def( a, b ):
> >    return a + b
> 
> I'm really not an expert in functional programming, so I wonder
> what's the difference between "add = def" (assumed that it worked)
> and "def add"?

In the former case one could write

    self.add[0] = def(a, b)
        # etc.

-- 
jk

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4