Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Bruno Desthuilliers
NickC a écrit : > On Sep 24, 9:16 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> Matthew Woodcraft a écrit : >>> One reason for the different syntax is that functions, unlike most >>> other objects, know their own names (which can be shown in tracebacks >>> and the like). >> Nope. They know

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread NickC
On Sep 24, 9:16 pm, Bruno Desthuilliers wrote: > Matthew Woodcraft a écrit : > > One reason for the different syntax is that functions, unlike most > > other objects, know their own names (which can be shown in tracebacks > > and the like). > > Nope. They know *one* of their names - the one they'v

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Bruno Desthuilliers
Matthew Woodcraft a écrit : > Cristian <[EMAIL PROTECTED]> wrote: >> To me, the biggest setback for new programmers is the different >> syntax Python has for creating functions. Instead of the common (and >> easy to grasp) syntax of foo = bar Python has the def foo(): syntax. > > [...] > >> in a

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Fri, 21 Sep 2007 22:07:55 +, Cristian wrote: > >> True, there is lambda, but that is very limited. It might be useful for >> key arguments, but not much else. > > No, lambda is useful for anything that any other function is useful for, > provided that you can w

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Duncan Booth
Carsten Haese <[EMAIL PROTECTED]> wrote: > It comes from the 'new' module: > import new help(new.function) > Help on class function in module __builtin__: > ... > > Oddly enough, the help misrepresents which module the function is coming > from. No, I don't think it is misrepresenting

RE: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Delaney, Timothy (Tim)
Carsten Haese wrote: >> Where the heck does *this* come from? Neither Python 2.5.1 nor the >> 3.0alpha has this in `__builtin__`. > > It comes from the 'new' module: > import new help(new.function) > Help on class function in module __builtin__: > ... > > Oddly enough, the help misre

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Kay Schluehr
On Sep 24, 9:09 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > Python: > > class B(object): > def __init__(self): > self.things = list() > > def add(self, thing): > self.things.append(thing) > > And Io: > > B := Object clone do( > init := method( > se

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Carsten Haese
On Mon, 2007-09-24 at 10:05 +, Marc 'BlackJack' Rintsch wrote: > On Mon, 24 Sep 2007 11:43:59 +0200, Bruno Desthuilliers wrote: > > > You already can create functions without using the def statement: > > > > Help on class function in module __builtin__: > > > > class function(object) > > |

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Marc 'BlackJack' Rintsch
On Mon, 24 Sep 2007 11:43:59 +0200, Bruno Desthuilliers wrote: > You already can create functions without using the def statement: > > Help on class function in module __builtin__: > > class function(object) > | function(code, globals[, name[, argdefs[, closure]]]) > | > | Create a funct

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Bruno Desthuilliers
Cristian a écrit : > On Sep 21, 5:21 pm, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > >> Ok, then what about classes ? They also are objects-like-any-other, >> after all. So should we have this syntax too ? >> >> MyClass = class(ParentClass): >>__init__ = function (self, name): >> s

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Paul Rubin
Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: > The fact that Python has difficulties is purely a demonstration of the > limitations of indentation-controlled syntax, not a criticism of the > concept itself. Not even. Haskell has indentation syntax (they call it "layout") but can have multi-lin

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > A question: if you WERE to implement function definitions as normal > expressions, how would you go about embedding it within an expression? > > x = map(def a: > > > > , [1, 2, 3]) Perl can

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Cristian wrote: > I think it would make more sense to have beginners _know_ that functions > are like all other variables ... Functions are not variables. Though they are values, and can be held in variables. In Python, every name is a variable, and can be assigne

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Bryan Olson wrote: > The keyword "lambda" sucks. ... > > Alonzo Church's calculus used the *symbol*. The keyword was popularized by LISP, and hence adopted by most other languages to copy the concept. In my view, it's no worse than using "=" for assignment instea

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-24 Thread Marc 'BlackJack' Rintsch
On Sun, 23 Sep 2007 18:32:28 -0700, Kay Schluehr wrote: > On 22 Sep., 02:14, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: >> Kay Schluehr a crit : >> (snip) >> >> > I checked out Io once and I disliked it. I expected Io's prototype OO >> > being just a more flexible variant of class based OO b

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-23 Thread Cristian
On Sep 21, 5:21 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Ok, then what about classes ? They also are objects-like-any-other, > after all. So should we have this syntax too ? > > MyClass = class(ParentClass): >__init__ = function (self, name): > self.name = name > > ?-) For co

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-23 Thread Kay Schluehr
On 22 Sep., 02:14, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Kay Schluehr a écrit : > (snip) > > > > > I checked out Io once and I disliked it. I expected Io's prototype OO > > being just a more flexible variant of class based OO but Io couples a > > prototype very closely to its offspring.

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-23 Thread Ron Adam
Scott David Daniels wrote: > Ron Adam wrote: >> Scott David Daniels wrote: >>> Ron Adam wrote: How about this? def integrate(fn, x1, x2, n=100):... >>> The point was a pedagogic suggestion, ... >> I understood your point. I just found it interesting since I've been >> trying to

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-23 Thread Bruno Desthuilliers
Cristian a écrit : > On Sep 21, 4:47 pm, "Sean Tierney" <[EMAIL PROTECTED]> wrote: > >>Just tell him that "functions are like all other variables and can >>therefore be passed by other functions or returned by other functions. >>" >> > > > > > I could """Just tell him that "functions are like

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-23 Thread Bruno Desthuilliers
Kay Schluehr a écrit : > On 22 Sep., 23:17, Erik Max Francis <[EMAIL PROTECTED]> wrote: > > >>The attribute and method (not made distinct in Io; they're called >>"slots") is much the same as with Python; the current instance is >>checked for the object, then its parents, then _its_ parents, and s

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-23 Thread Bruno Desthuilliers
Kay Schluehr a écrit : (snip) > > I checked out Io once and I disliked it. I expected Io's prototype OO > being just a more flexible variant of class based OO but Io couples a > prototype very closely to its offspring. When A produces B and A.f is > modified after production of B also B.f is modif

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-23 Thread Bruno Desthuilliers
Cristian a écrit : (snip) > To me, the biggest setback for new programmers is the different syntax > Python has for creating functions. Instead of the common (and easy to > grasp) syntax of foo = bar It's actually a mostly *un*common syntax when it comes to functions. The only "mainstream" langua

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-23 Thread Scott David Daniels
Ron Adam wrote: > Scott David Daniels wrote: >> Ron Adam wrote: >>> How about this? >>> def integrate(fn, x1, x2, n=100):... >> The point was a pedagogic suggestion, ... > I understood your point. I just found it interesting since I've been > trying to extend my math (for use with python) s

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-23 Thread Ron Adam
Scott David Daniels wrote: > Ron Adam wrote: >> >> Scott David Daniels wrote: >>> Cristian wrote: On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote: > I think key may be to discuss names and name binding with your friend. >>> Here's an idea: >>> >>> import math >>> >>> def sin_

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Kay Schluehr
On 22 Sep., 23:17, Erik Max Francis <[EMAIL PROTECTED]> wrote: > The attribute and method (not made distinct in Io; they're called > "slots") is much the same as with Python; the current instance is > checked for the object, then its parents, then _its_ parents, and so on. Repeating the same poin

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Steven D'Aprano
On Sat, 22 Sep 2007 14:09:13 -0700, Paul Rubin wrote: >> Nevertheless, def is never a real anonymous function constructor. > > Well, def constructs a function with a name, but the function can stay > around after the name goes away, after which I'd say the function is > nameless. One could other

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Erik Max Francis
Kay Schluehr wrote: > I checked out Io once and I disliked it. I expected Io's prototype OO > being just a more flexible variant of class based OO but Io couples a > prototype very closely to its offspring. When A produces B and A.f is > modified after production of B also B.f is modified. A contr

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Paul Rubin
Bryan Olson <[EMAIL PROTECTED]> writes: > How anonymous is that function when we can see that its name is 'h'? h is out of scope after compose returns, so the function is anonymous in the sense that there is no symbol bound to the function, through which you can refer to it. > import math >

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Bryan Olson
Paul Rubin wrote: > Bryan Olson <[EMAIL PROTECTED]> writes: >> [EMAIL PROTECTED] wrote: >>> There are already anonymous functions in Python. >>> lambda x, y, z: x + y + z >>> is the same as: >>> def _(x, y, z): return x + y + z >> They are the same only in special cases: >> The special identif

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Bryan Olson
Cristian wrote: > [...] Specifically, he's having trouble > thinking of functions as first order data (don't worry, I haven't > confused him with such terminology yet). [...] > And, after we finally > get a hold of first order functions, we appreciate its incorporation > into languages. It would b

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Paul Rubin
Bryan Olson <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > There are already anonymous functions in Python. > > lambda x, y, z: x + y + z > > is the same as: > > def _(x, y, z): return x + y + z > > They are the same only in special cases: > The special identifier "_" is used in t

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Matthew Woodcraft
Cristian <[EMAIL PROTECTED]> wrote: > To me, the biggest setback for new programmers is the different > syntax Python has for creating functions. Instead of the common (and > easy to grasp) syntax of foo = bar Python has the def foo(): syntax. [...] > in a program like Python there doesn't seem

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Bryan Olson
[EMAIL PROTECTED] wrote: > There are already anonymous functions in Python. > > lambda x, y, z: x + y + z > > is the same as: > > def _(x, y, z): return x + y + z They are the same only in special cases: The special identifier "_" is used in the interactive interpreter to store the r

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Marc 'BlackJack' Rintsch
On Sat, 22 Sep 2007 06:58:57 -0700, Kay Schluehr wrote: > On Sep 22, 1:15 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Sat, 22 Sep 2007 02:44:35 -0700, Kay Schluehr wrote: >> > I checked out Io once and I disliked it. I expected Io's prototype OO >> > being just a more flexible va

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Scott David Daniels
Ron Adam wrote: > > > Scott David Daniels wrote: >> Cristian wrote: >>> On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >>> I think key may be to discuss names and name binding with your friend. >> >> Here's an idea: >> >> import math >> >> def sin_integral(start, finish, dx): ... >>

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Kay Schluehr
On Sep 22, 1:15 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 22 Sep 2007 02:44:35 -0700, Kay Schluehr wrote: > > I checked out Io once and I disliked it. I expected Io's prototype OO > > being just a more flexible variant of class based OO but Io couples a > > prototype very cl

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Carl Banks
On Sat, 22 Sep 2007 02:32:30 -0700, Paul Rubin wrote: > Carl Banks <[EMAIL PROTECTED]> writes: >> That's it, lost me already. You ever see the kinds of programs >> mechanical engineers write? It isn't software. > > They do a lot of number crunching. Certainly they can appreciate higher > order

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Marc 'BlackJack' Rintsch
On Sat, 22 Sep 2007 02:44:35 -0700, Kay Schluehr wrote: > I checked out Io once and I disliked it. I expected Io's prototype OO > being just a more flexible variant of class based OO but Io couples a > prototype very closely to its offspring. When A produces B and A.f is > modified after productio

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Kay Schluehr
On Sep 22, 10:40 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 22 Sep 2007 00:47:37 -0700, Kay Schluehr wrote: > > On 22 Sep., 08:56, Paul Rubin wrote: > >> Kay Schluehr <[EMAIL PROTECTED]> writes: > >> > If you feel you can transform it into another u

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Paul Rubin
Carl Banks <[EMAIL PROTECTED]> writes: > That's it, lost me already. You ever see the kinds of programs > mechanical engineers write? It isn't software. They do a lot of number crunching. Certainly they can appreciate higher order functions like integrate(f, x0, x1) to integrate the function f

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Carl Banks
On Fri, 21 Sep 2007 23:38:38 -0700, Paul Rubin wrote: > Carl Banks <[EMAIL PROTECTED]> writes: >> Especially someone like an >> engineer (in the classical sense), who isn't building versatile >> software packages, won't need to resort to functional programming much. > > http://www.math.chalmers.s

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Marc 'BlackJack' Rintsch
On Sat, 22 Sep 2007 00:47:37 -0700, Kay Schluehr wrote: > On 22 Sep., 08:56, Paul Rubin wrote: >> Kay Schluehr <[EMAIL PROTECTED]> writes: >> > If you feel you can transform it into another unambigous grammar >> > mixing statements and expressions it's up to you. >> >> W

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Kay Schluehr
On 22 Sep., 08:56, Paul Rubin wrote: > Kay Schluehr <[EMAIL PROTECTED]> writes: > > If you feel you can transform it into another unambigous grammar > > mixing statements and expressions it's up to you. > > We got rid of the print statement for python 3.0. Why not get ri

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Ron Adam
Scott David Daniels wrote: > Cristian wrote: >> On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >> >>> I think key may be to discuss names and name binding with your friend. > > Here's an idea: > > import math > > def sin_integral(start, finish, dx): > total = 0.0 > y0 = math

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Paul Rubin
Kay Schluehr <[EMAIL PROTECTED]> writes: > If you feel you can transform it into another unambigous grammar > mixing statements and expressions it's up to you. We got rid of the print statement for python 3.0. Why not get rid of the rest of them too? Just use expressions for everything, as works

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Kay Schluehr
On 22 Sep., 00:36, Cristian <[EMAIL PROTECTED]> wrote: > Yeah, I agree, that does look pretty ugly. Correct me if I'm wrong, > but I thought the way Python determines a block is by the whitespace > of the first line. So, as long as the spacing (or !tabbing!) is > consistent from line to line the p

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Paul Rubin
Carl Banks <[EMAIL PROTECTED]> writes: > Especially someone like an > engineer (in the classical sense), who isn't building versatile software > packages, won't need to resort to functional programming much. http://www.math.chalmers.se/~rjmh/Papers/whyfp.html -- http://mail.python.org/mailman/

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Marc 'BlackJack' Rintsch
On Fri, 21 Sep 2007 19:52:41 -0400, Carl Banks wrote: > First of all, let me say that I think "functions as first class data" is > helpful, but not crucial, to programming in Python, and there are many > people who simply don't need the lesson. Especially someone like an > engineer (in the cla

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Scott David Daniels
Cristian wrote: > On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote: > >> I think key may be to discuss names and name binding with your friend. Here's an idea: import math def sin_integral(start, finish, dx): total = 0.0 y0 = math.sin(start) for n in range(1, 1 + int((finis

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2007 22:07:55 +, Cristian wrote: > True, there is lambda, but that is very limited. It might be useful for > key arguments, but not much else. No, lambda is useful for anything that any other function is useful for, provided that you can write it as a single expression and not

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Ron Adam
Cristian wrote: > On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote: > >> I think key may be to discuss names and name binding with your friend. How >> a name is not the object it self, like a variable is in other languages. >> For example show him how an object can have more than one name

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Carl Banks
On Fri, 21 Sep 2007 21:37:18 +, Cristian wrote: > Although his learning experience has gone mostly smoothly, he's hit a > lot of speed bumps with functions. Specifically, he's having trouble > thinking of functions as first order data (don't worry, I haven't > confused him with such terminology

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Cristian
On Sep 21, 4:47 pm, "Sean Tierney" <[EMAIL PROTECTED]> wrote: > Just tell him that "functions are like all other variables and can > therefore be passed by other functions or returned by other functions. > " > I could """Just tell him that "functions are like all other variables and can theref

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Cristian
On Sep 21, 4:27 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: > Cristian wrote: > > On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote: > > >> I think key may be to discuss names and name binding with your friend. How > >> a name is not the object it self, like a variable is in other language

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Sean Tierney
On 9/21/07, Sean Tierney <[EMAIL PROTECTED]> wrote: > Just tell him that "functions are like all other variables and can > therefore be passed by other functions or returned by other functions. > " > > If your friend understands variables and functions and he can't make > the "leap" (and assuming

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Sean Tierney
Just tell him that "functions are like all other variables and can therefore be passed by other functions or returned by other functions. " If your friend understands variables and functions and he can't make the "leap" (and assuming you're right, of course) then your friend doesn't understand va

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Cristian <[EMAIL PROTECTED]> wrote: ... > To someone who's learning to program wouldn't a syntax like the > further give them all they need and also reinforces the idea that > functions are data just like everything else? > > my_function = function(foo, bar): pass

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread J. Cliff Dyer
Cristian wrote: > On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote: > > >> I think key may be to discuss names and name binding with your friend. How >> a name is not the object it self, like a variable is in other languages. >> For example show him how an object can have more than one na

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Cristian
On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote: > I think key may be to discuss names and name binding with your friend. How > a name is not the object it self, like a variable is in other languages. > For example show him how an object can have more than one name. And discus > how names

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Ron Adam
Cristian wrote: > My hope is to subtly reinforce the notion that functions are data > and can be passed around. The current function declaration doesn't > help with this. Creating a function and assigning it to a name is > exactly what Python does, why not have it come out in the syntax? It's > n

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Cristian
On Sep 21, 3:22 pm, [EMAIL PROTECTED] wrote: > On Sep 21, 6:07 pm, Cristian <[EMAIL PROTECTED]> wrote: > > > > > On Sep 21, 2:48 pm, [EMAIL PROTECTED] wrote: > > > > There are already anonymous functions in Python. > > > > lambda x, y, z: x + y + z > > > > is the same as: > > > > def _(x, y, z): re

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread chris . monsanto
On Sep 21, 6:07 pm, Cristian <[EMAIL PROTECTED]> wrote: > On Sep 21, 2:48 pm, [EMAIL PROTECTED] wrote: > > > > > There are already anonymous functions in Python. > > > lambda x, y, z: x + y + z > > > is the same as: > > > def _(x, y, z): return x + y + z > > > As for the method stuff, check out sta

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Cristian
On Sep 21, 2:48 pm, [EMAIL PROTECTED] wrote: > There are already anonymous functions in Python. > > lambda x, y, z: x + y + z > > is the same as: > > def _(x, y, z): return x + y + z > > As for the method stuff, check out staticmethod(). If you assign > staticmethod() to an object, it will be treat

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread chris . monsanto
On Sep 21, 5:37 pm, Cristian <[EMAIL PROTECTED]> wrote: > A friend of mine is an engineer and he's been needing to do more and > more programming as he goes on with is career. I convinced him to > learn Python instead of Perl and he's really started to like it. He > usually comes to me when he can'