Re: Explain your acronyms (RSI?)

2013-07-06 Thread Rotwang
On 06/07/2013 21:11, Stefan Behnel wrote: Rotwang, 06.07.2013 21:51: On 06/07/2013 20:38, Terry Reedy wrote: "rms has crippling RSI" (anonymous, as quoted by Skip). [...] Let us try Google. Type in RSI and it offers 'RSI medications' as a choice. Sound good, as it will eliminate all the compani

Re: Explain your acronyms (RSI?)

2013-07-06 Thread Stefan Behnel
Rotwang, 06.07.2013 21:51: > On 06/07/2013 20:38, Terry Reedy wrote: >> "rms has crippling RSI" (anonymous, as quoted by Skip). >> [...] >> Let us try Google. Type in RSI and it offers 'RSI medications' as a >> choice. Sound good, as it will eliminate all the companies with those >> initials. The t

Re: Explain your acronyms (RSI?)

2013-07-06 Thread Robert Kern
On 2013-07-06 20:38, Terry Reedy wrote: "rms has crippling RSI" (anonymous, as quoted by Skip). I suspect that 'rms' = Richard M Stallman (but why lower case? to insult him?). http://stallman.org/ """ "Richard Stallman" is just my mundane name; you can call me "rms". """ But Skip mentions '

Re: Explain your acronyms (RSI?)

2013-07-06 Thread Rotwang
On 06/07/2013 20:38, Terry Reedy wrote: "rms has crippling RSI" (anonymous, as quoted by Skip). I suspect that 'rms' = Richard M Stallman (but why lower case? to insult him?). I 'know' that RSI = Roberts Space Industries, a game company whose Kickstarter project I supported. Whoops, wrong contex

Re: Explain your acronyms (RSI?)

2013-07-06 Thread Benjamin Kaplan
On Sat, Jul 6, 2013 at 12:38 PM, Terry Reedy wrote: > "rms has crippling RSI" (anonymous, as quoted by Skip). > > I suspect that 'rms' = Richard M Stallman (but why lower case? to insult > him?). I 'know' that RSI = Roberts Space Industries, a game company whose > Kickstarter project I supported.

Re: explain

2009-02-16 Thread Terry Reedy
Jeroen Ruigrok van der Werven wrote: -On [20090216 11:17], Saeed Iravani (si.4...@yahoo.com) wrote: I download python 2.5.4 and install but I dont know that how perform python? I dont know from which directory perform python? It would help if you would clarify which operating system you are us

Re: explain

2009-02-16 Thread Jeroen Ruigrok van der Werven
-On [20090216 11:17], Saeed Iravani (si.4...@yahoo.com) wrote: >I download python 2.5.4 and install but I dont know that how perform python? >I dont know from which directory perform python? It would help if you would clarify which operating system you are using. On Unix/Linux systems you make su

Re: explain

2009-02-11 Thread Python Nutter
If your use is to Generically "want to use python on Windows XP" you install the standard/generic Python that you download from python.org Without any details to decide with, I would also say download version 2.5.4 of Python from python.org 2009/2/12 Saeed Iravani : > Hello, I want to use python

Re: explain

2009-02-11 Thread gofkuckyourself
Saeed, The standard Python distribution is community supported and available on Windows http://www.python.org/download/windows/ ActivePython is ActiveState's version of Python with extra libraries and commercial support available VPython I am not familiar with, perhaps someone else can speak to thi

Re: explain slice assignment to newb

2008-09-20 Thread Stephen Horne
On Sat, 20 Sep 2008 14:20:20 -0700 (PDT), Andrew <[EMAIL PROTECTED]> wrote: >please explain this behavior to a newb: > a = [1,2,3,4] b = ["a","b","c","d"] a[0:2] = b[0:2] The slice [0:2] represent positions 0 <= x < 2 Replaces the [1, 2] from [1, 2, 3, 4] with ['a', 'b'] Result: a

Re: explain slice assignment to newb

2008-09-20 Thread Terry Reedy
Andrew wrote: please explain this behavior to a newb: Read the section on sequence slicing in the Library Reference. Use the interactive interpreter or IDLE to perform experiments, like you did, until you understand to your satisfaction. -- http://mail.python.org/mailman/listinfo/python-li

Re: explain slice assignment to newb

2008-09-20 Thread Sean DiZazzo
On Sep 20, 2:20 pm, Andrew <[EMAIL PROTECTED]> wrote: > please explain this behavior to a newb: > > >>> a = [1,2,3,4] > >>> b = ["a","b","c","d"] > >>> a > [1, 2, 3, 4] > >>> b > > ['a', 'b', 'c', 'd'] > > >>> a[0:2] > [1, 2] > >>> a > [1, 2, 3, 4] > >>> b[2:4] > ['c', 'd'] > >>> a[0:2] = b[0:2] >

Re: explain this function to me, lambda confusion

2008-05-20 Thread Arnaud Delobelle
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Paul McGuire a écrit : >> On May 19, 11:04 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >>> Paul McGuire <[EMAIL PROTECTED]> writes: >>> >>> [...] >>> >>> Could you use it as a decoratore instead? >>> >>> integer = Word("0123456789") >>> >>> @in

Re: explain this function to me, lambda confusion

2008-05-20 Thread Bruno Desthuilliers
Paul McGuire a écrit : On May 19, 11:04 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: Paul McGuire <[EMAIL PROTECTED]> writes: [...] Could you use it as a decoratore instead? integer = Word("0123456789") @integer.setParseAction def parse_integer(tokens): return int(tokens[0]) I could

Re: explain this function to me, lambda confusion

2008-05-19 Thread Arnaud Delobelle
Paul McGuire <[EMAIL PROTECTED]> writes: > On May 19, 11:04 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >> Paul McGuire <[EMAIL PROTECTED]> writes: >> >> [...] >> >> Could you use it as a decoratore instead? >> >> integer = Word("0123456789") >> >> @integer.setParseAction >> def parse_integer(

Re: explain this function to me, lambda confusion

2008-05-19 Thread Paul McGuire
On May 19, 11:04 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > Paul McGuire <[EMAIL PROTECTED]> writes: > > [...] > > Could you use it as a decoratore instead? > > integer = Word("0123456789") > > @integer.setParseAction > def parse_integer(tokens): >     return int(tokens[0]) > > I could make

Re: explain this function to me, lambda confusion

2008-05-19 Thread Arnaud Delobelle
Paul McGuire <[EMAIL PROTECTED]> writes: [...] > lambda is handy in defining parse actions in pyparsing. Parse actions > are callbacks to be run when an expression within a larger grammar is > matched. A common use for parse actions is to do some sort of text or > type conversion. The simplest

Re: explain this function to me, lambda confusion

2008-05-19 Thread Paul McGuire
On May 18, 10:41 am, "inhahe" <[EMAIL PROTECTED]> wrote: > > Both the responses offer lambda free alternatives. That's fine, and > > given the terse documentation and problems that I had understanding > > them, I would agree. So what applications are lambdas suited to? I > > think the parameterised

Re: explain this function to me, lambda confusion

2008-05-19 Thread Terry Reedy
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On May 19, 5:22 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote: | > "Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message | [...] | > | Note that the same thing can be said about generator expressions, | > | which are

Re: explain this function to me, lambda confusion

2008-05-19 Thread Bruno Desthuilliers
inhahe a écrit : Both the responses offer lambda free alternatives. That's fine, and given the terse documentation and problems that I had understanding them, I would agree. So what applications are lambdas suited to? I think the parameterised function model is one. What else? i've hardly ever

Re: explain this function to me, lambda confusion

2008-05-19 Thread Arnaud Delobelle
On May 19, 5:22 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message [...] > | Note that the same thing can be said about generator expressions, > | which are nothing more than anonymous, non-reusable, generator > | functions. > > Right. So if some

Re: explain this function to me, lambda confusion

2008-05-18 Thread Terry Reedy
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Lie <[EMAIL PROTECTED]> writes: | | > Lambda can actually be safely removed from python and no other | > features would be missing. It is always possible to create a def | > version of any lambda, so lambda is useles

Re: explain this function to me, lambda confusion

2008-05-18 Thread inhahe
> > Both the responses offer lambda free alternatives. That's fine, and > given the terse documentation and problems that I had understanding > them, I would agree. So what applications are lambdas suited to? I > think the parameterised function model is one. > What else? i've hardly ever used lam

Re: explain this function to me, lambda confusion

2008-05-18 Thread Arnaud Delobelle
Lie <[EMAIL PROTECTED]> writes: > Lambda can actually be safely removed from python and no other > features would be missing. It is always possible to create a def > version of any lambda, so lambda is useless. It is just a convenience > for the times where we're just too lazy to invent a name and

Re: explain this function to me, lambda confusion

2008-05-18 Thread Lie
On May 9, 12:12 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 08 May 2008 22:57:03 -0300,   > <[EMAIL PROTECTED]> escribió: > > > > > On May 8, 6:11 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > > >> No, no, no, no, no! > > Geez.  Go easy. > >> You have got it entirely wrong here. Yo

Re: explain this function to me, lambda confusion

2008-05-18 Thread Lie
On May 9, 8:57 am, [EMAIL PROTECTED] wrote: > On May 8, 6:11 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > > > > > No, no, no, no, no! > > Geez.  Go easy. > > > > > You have got it entirely wrong here. Your XOR function simply returns a > > function which gives you the result of xoring the paramete

Re: explain this function to me, lambda confusion

2008-05-09 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > Indeed, there are many ways this could be done. Some are more > concise, some are more efficient. As I said, I did it the way I did > it to try out lambdas. Your way achieves the result, rather elegantly > I think, but teaches me nothing about using lambdas. Unfortun

Re: explain this function to me, lambda confusion

2008-05-08 Thread Gabriel Genellina
En Thu, 08 May 2008 22:57:03 -0300, <[EMAIL PROTECTED]> escribió: On May 8, 6:11 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: No, no, no, no, no! Geez. Go easy. You have got it entirely wrong here. Your XOR function simply [...] Pardon my tetchiness, but it is a little hard to receive su

Re: explain this function to me, lambda confusion

2008-05-08 Thread andrej . panjkov
On May 8, 6:11 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > > No, no, no, no, no! > Geez. Go easy. > You have got it entirely wrong here. Your XOR function simply returns a > function which gives you the result of xoring the parameters AT THE TIME > WHEN YOU ORIGINALLY CREATED IT. I'm guessing

Re: explain this function to me, lambda confusion

2008-05-08 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > Here is a simple lambda that implements an exclusive or: > def XOR(x,y) : return lambda : ( ( x ) and not ( y ) ) or ( not ( x ) and ( y ) ) > > (Because of the resemblance to C macros, I have been cautious and > written the lambda with lots of parentheses

Re: explain this function to me, lambda confusion

2008-05-07 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On May 8, 7:38 am, globalrev <[EMAIL PROTECTED]> wrote: | I would describe a lambda as a parameterised function template. If you | dig, the docs call lambdas anonymous functions not bound to a name. A lambda expression is an abbrevia

Re: explain this function to me, lambda confusion

2008-05-07 Thread andrej . panjkov
On May 8, 10:34 am, [EMAIL PROTECTED] wrote: > > >>> HeightDistrib = (170, 20) > That should be > >>> HeightDistrib = Gaussian(170, 20) -- http://mail.python.org/mailman/listinfo/python-list

Re: explain this function to me, lambda confusion

2008-05-07 Thread andrej . panjkov
On May 8, 7:38 am, globalrev <[EMAIL PROTECTED]> wrote: > i have a rough understanding of lambda but so far only have found use > for it once(in tkinter when passing lambda as an argument i could > circumvent some tricky stuff). > what is the point of the following function? > > def addn(n): >

Re: explain this function to me, lambda confusion

2008-05-07 Thread Gabriel Genellina
En Wed, 07 May 2008 18:38:15 -0300, globalrev <[EMAIL PROTECTED]> escribió: i have a rough understanding of lambda but so far only have found use for it once(in tkinter when passing lambda as an argument i could circumvent some tricky stuff). what is the point of the following function? def a

Re: explain this function to me, lambda confusion

2008-05-07 Thread [EMAIL PROTECTED]
On 7 mai, 23:38, globalrev <[EMAIL PROTECTED]> wrote: > i have a rough understanding of lambda but so far only have found use > for it once(in tkinter when passing lambda as an argument i could > circumvent some tricky stuff). > what is the point of the following function? > > def addn(n): >

Re: explain this function to me, lambda confusion

2008-05-07 Thread globalrev
On 7 Maj, 23:47, globalrev <[EMAIL PROTECTED]> wrote: > and what si the diffrence here: > > g = lambda x=5:x*x > g = lambda x:x*x > > the first was a mistake to write but it worked > and the x=5 seems to be completely ignored. why? it has no effect at > all? ah wait now i see it has a default kind

Re: explain this function to me, lambda confusion

2008-05-07 Thread globalrev
and what si the diffrence here: g = lambda x=5:x*x g = lambda x:x*x the first was a mistake to write but it worked and the x=5 seems to be completely ignored. why? it has no effect at all? -- http://mail.python.org/mailman/listinfo/python-list