Re: List of Functions

2016-03-28 Thread Christian Gollwitzer
Am 29.03.16 um 08:21 schrieb Rustom Mody: Dijkstra liked to point out that CS was backward in America compared to Europe because in Europe they used 'store' but Americans used anthropomorphism like memory Now given that store can mean -- among other things -- - room where I dump stuff - shop wh

Re: List of Functions

2016-03-28 Thread Marko Rauhamaa
Rustom Mody : > And my mum made the strange remark: "You guys use all the words that I > know. And you make them into sentences that have no meaning at all." That's what I think when I hear Estonian spoken. > My own finding is that repurposing old words to new concepts causes > more confusion an

Re: List of Functions

2016-03-28 Thread Rustom Mody
On Tuesday, March 29, 2016 at 8:16:12 AM UTC+5:30, Ben Bacarisse wrote: > Steven D'Aprano writes: > > > On Mon, 28 Mar 2016 06:51 pm, Jussi Piitulainen wrote: > > > >> Ben Bacarisse writes: > >> > >>> It's shame that anonymous functions (for that's what's being returned > >>> here -- a function w

Re: List of Functions

2016-03-28 Thread Chris Angelico
On Tue, Mar 29, 2016 at 3:45 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote: >>> Dan Sommers : >>> On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote: > As for Python, I don't feel a great need for anonymous functions.

Re: List of Functions

2016-03-28 Thread Marko Rauhamaa
Steven D'Aprano : > On Tue, 29 Mar 2016 08:40 am, Chris Angelico wrote: > >> On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote: >>> Dan Sommers : >>> On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote: > As for Python, I don't feel a great need for anonymous functions. > H

Re: List of Functions

2016-03-28 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote: >> Dan Sommers : >> >>> On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote: >>> As for Python, I don't feel a great need for anonymous functions. However, I keep running into a need for anonymous classes, o

Re: List of Functions

2016-03-28 Thread Chris Angelico
On Tue, Mar 29, 2016 at 1:45 PM, Ben Bacarisse wrote: > If functions were defined > > fun f(x): return x * x > > then an anonymous function could be written as a function definition but > the name > > fun (x): return x * x > > I suppose you could do that even with "def" but it's a bit less > m

Re: List of Functions

2016-03-28 Thread Ben Bacarisse
Steven D'Aprano writes: > On Mon, 28 Mar 2016 06:51 pm, Jussi Piitulainen wrote: > >> Ben Bacarisse writes: >> >>> It's shame that anonymous functions (for that's what's being returned >>> here -- a function with no name) were born of a subject that used >>> arbitrary Greek letters for things.

Re: List of Functions

2016-03-28 Thread Rustom Mody
On Tuesday, March 29, 2016 at 5:11:02 AM UTC+5:30, Steven D'Aprano wrote: > On Mon, 28 Mar 2016 06:51 pm, Jussi Piitulainen wrote: > > > Ben Bacarisse writes: > > > >> It's shame that anonymous functions (for that's what's being returned > >> here -- a function with no name) were born of a subjec

Re: List of Functions

2016-03-28 Thread Chris Angelico
On Tue, Mar 29, 2016 at 10:50 AM, Random832 wrote: > On Mon, Mar 28, 2016, at 19:40, Steven D'Aprano wrote: >> Not to mention "Monad". I don't think *anyone* knows what a Monad is ;-) > > A monad is just a monoid in the category of endofunctors; what's the > problem? > > Well, someone had to say i

Re: List of Functions

2016-03-28 Thread Random832
On Mon, Mar 28, 2016, at 19:40, Steven D'Aprano wrote: > Not to mention "Monad". I don't think *anyone* knows what a Monad is ;-) A monad is just a monoid in the category of endofunctors; what's the problem? Well, someone had to say it. -- https://mail.python.org/mailman/listinfo/python-list

Re: List of Functions

2016-03-28 Thread Steven D'Aprano
On Mon, 28 Mar 2016 06:51 pm, Jussi Piitulainen wrote: > Ben Bacarisse writes: > >> It's shame that anonymous functions (for that's what's being returned >> here -- a function with no name) were born of a subject that used >> arbitrary Greek letters for things. We seem stuck with the mysterious

Re: List of Functions

2016-03-28 Thread Chris Angelico
On Tue, Mar 29, 2016 at 9:52 AM, Steven D'Aprano wrote: > That would be called "type" :-) > > type(name, bases, namespace) returns a new class: > > > py> C = type("MyClass", (object,), {'foo': 1}) > py> C > > py> C.foo > 1 Yeah, but to do that in a single expression, you need to have all the fun

Re: List of Functions

2016-03-28 Thread Steven D'Aprano
On Tue, 29 Mar 2016 08:40 am, Chris Angelico wrote: > On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote: >> Dan Sommers : >> >>> On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote: >>> As for Python, I don't feel a great need for anonymous functions. However, I keep running i

Re: List of Functions

2016-03-28 Thread Chris Angelico
On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote: > Dan Sommers : > >> On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote: >> >>> As for Python, I don't feel a great need for anonymous functions. >>> However, I keep running into a need for anonymous classes, or, >>> rather, classless o

Re: List of Functions

2016-03-28 Thread Marko Rauhamaa
Dan Sommers : > On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote: > >> As for Python, I don't feel a great need for anonymous functions. >> However, I keep running into a need for anonymous classes, or, >> rather, classless objects. Not a biggie. I just create a one-off >> inner class and

Re: List of Functions

2016-03-28 Thread Dan Sommers
On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote: > As for Python, I don't feel a great need for anonymous functions. > However, I keep running into a need for anonymous classes, or, rather, > classless objects. Not a biggie. I just create a one-off inner class > and instantiate it, but I

Re: List of Functions

2016-03-28 Thread Marko Rauhamaa
Jussi Piitulainen : > Ben Bacarisse writes: >> It's shame that anonymous functions (for that's what's being returned >> here -- a function with no name) were born of a subject that used >> arbitrary Greek letters for things. We seem stuck with the mysterious >> but meaningless "lambda" for a very

Re: List of Functions

2016-03-28 Thread Jussi Piitulainen
Ben Bacarisse writes: > It's shame that anonymous functions (for that's what's being returned > here -- a function with no name) were born of a subject that used > arbitrary Greek letters for things. We seem stuck with the mysterious > but meaningless "lambda" for a very simple and useful idea.

Re: List of Functions

2016-03-27 Thread Ben Bacarisse
Richard Riehle writes: > Several months ago, I posted a question regarding how to create a list > of functions. > I realize that this seems trivial to many experience Pythonistas. But > it might prove useful for those who are relative newcomers to the > language. In any case, I hope someone ca

Re: List of Functions

2016-03-27 Thread Erik
Hi Richard, On 27/03/16 20:38, Richard Riehle wrote: I realize that this seems trivial to many experience Pythonistas. But it might prove useful for those who are relative newcomers Thanks for sharing your solution (people finding the original question because it happens to match their own

Re: list of functions question

2006-04-27 Thread val
Tim, Greatly appreciate your help. You are right - the functions work from the list; i don't actually need the string with events. Thanks again - great list and great people... Val -- http://mail.python.org/mailman/listinfo/python-list

Re: list of functions question

2006-04-27 Thread val
Hi Kent, Thanks. Great help. It does work now, and with expressions as well. my very best, Val -- http://mail.python.org/mailman/listinfo/python-list

Re: list of functions question

2006-04-27 Thread val
John Machin wrote: > On 27/04/2006 10:38 AM, val bykoski wrote: > > Hi The List: > > I have a modeling app where i'm detecting events (in temporal > > dynamics) applying a set of (boolean) functions - kind of: > > > > event_list = "f1 f2 etc".split() # each fi detects a specific event > > i have

Re: list of functions question

2006-04-27 Thread Kent Johnson
val bykoski wrote: > Hi The List: >I have a modeling app where i'm detecting events (in temporal > dynamics) applying a set of (boolean) functions - kind of: > > event_list = "f1 f2 etc".split() # each fi detects a specific event > i have defs for functions fi, or simple boolean expressions

Re: list of functions question

2006-04-27 Thread John Machin
On 27/04/2006 10:38 AM, val bykoski wrote: > Hi The List: > I have a modeling app where i'm detecting events (in temporal > dynamics) applying a set of (boolean) functions - kind of: > > event_list = "f1 f2 etc".split() # each fi detects a specific event > i have defs for functions fi, or simp

Re: list of functions question

2006-04-27 Thread Tim Roberts
val bykoski <[EMAIL PROTECTED]> wrote: > >Hi The List: > I have a modeling app where i'm detecting events (in temporal >dynamics) applying a set of (boolean) functions - kind of: > >event_list = "f1 f2 etc".split() # each fi detects a specific event >i have defs for functions fi, or simple bool