Re: [Tutor] Question about Functions

2013-09-10 Thread Steven D'Aprano
On Tue, Sep 10, 2013 at 01:49:11PM -0400, novo shot wrote: > When I declare a variable to be equal as the fucntion > (result=theFunction("this either")) is Python also executing the > function? No, you have misunderstood. Equals in programming languages is not the same as equals in mathematics.

Re: [Tutor] Question about Functions

2013-09-10 Thread Dino Bektešević
> Date: Tue, 10 Sep 2013 13:34:50 -0400 > From: novo shot > To: tutor@python.org > Subject: [Tutor] Question about Functions > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Dear tutors: > > The following is an example I

Re: [Tutor] Question about Functions

2013-09-10 Thread Alan Gauld
On 10/09/13 18:49, novo shot wrote: Dear tutors: The following is an example I found in the Raspberry Pi for Dummies book: #function test def theFunction(message): print "I don't get ", message return "ARRRGH!" All the code above does is define the function and assign it the name

Re: [Tutor] Question about Functions

2013-09-10 Thread Prasad, Ramit
novo shot wrote: > Dear tutors: > > The following is an example I found in the Raspberry Pi for Dummies book: > > #function test > > def theFunction(message): > print "I don't get ", message > return "ARRRGH!" > > theFunction("this") > > result=theFunction("this either") > print "reply

Re: [Tutor] Question about Functions

2013-09-10 Thread Chris Down
On 2013-09-10 13:34, novo shot wrote: > When I declare a variable to be equal as the fucntion > (result=theFunction("this either")) is Python also executing the function? You're not declaring it as equal, that would be `==' (or `is' for identity). `=' assigns, it doesn't check for equality. > The

[Tutor] Question about Functions

2013-09-10 Thread novo shot
Dear tutors: The following is an example I found in the Raspberry Pi for Dummies book: #function test def theFunction(message): print "I don't get ", message return "ARRRGH!" theFunction("this") result=theFunction("this either") print "reply is: ", result -

Re: [Tutor] Question about Functions

2013-09-10 Thread Joel Goldstick
On Tue, Sep 10, 2013 at 1:49 PM, novo shot wrote: > Dear tutors: > > The following is an example I found in the Raspberry Pi for Dummies book: > > #function test > > def theFunction(message): > print "I don't get ", message > return "ARRRGH!" > > theFunction("this") > the above line invo

[Tutor] Question about Functions

2013-09-10 Thread novo shot
Dear tutors: The following is an example I found in the Raspberry Pi for Dummies book: #function test def theFunction(message): print "I don't get ", message return "ARRRGH!" theFunction("this") result=theFunction("this either") print "reply is: ", result -