Re: [Tutor] Link required for difference between class and object

2013-11-17 Thread Alan Gauld
On 17/11/13 12:24, Reuben wrote: Hi All, It would be nice if someone could forward a link which explains classes and object. I am still struggling to understand classes and objects better. You can try the OOP topic in my tutorial if you like... In a nutshell: A class is a type, like string or

Re: [Tutor] basic function concept

2013-11-17 Thread Alex Kleider
On 2013-11-16 22:31, John Aten wrote: Too bad that doesn't work. No, it doesn't. Can you see why? Attached is a version that does work but you'd be better served looking at the two versions you already have and studying the error messages you get when you run them. On Nov 16, 2013, at 1

Re: [Tutor] basic function concept

2013-11-17 Thread Alex Kleider
On 2013-11-17 00:47, Alan Gauld wrote: On 17/11/13 05:16, Alex Kleider wrote: On 2013-11-16 13:20, Byron Ruffin wrote: def main(x, y, z): print (x, y, z) def funct(): x = 1 y = 2 z = 3 return x, y, z main() Can someone tell me why main is not being given any arguments?

Re: [Tutor] Link required for difference between class and object

2013-11-17 Thread Mark Lawrence
On 17/11/2013 12:24, Reuben wrote: Hi All, It would be nice if someone could forward a link which explains classes and object. I am still struggling to understand classes and objects better. Regards, Reuben An extremely simplistic answer to get you going, a class is the template that you ha

Re: [Tutor] Link required for difference between class and object

2013-11-17 Thread Joel Goldstick
On Sun, Nov 17, 2013 at 7:24 AM, Reuben wrote: > Hi All, > > It would be nice if someone could forward a link which explains classes and > object. > I am still struggling to understand classes and objects better. > > Regards, > Reuben > > ___ > Tutor mai

[Tutor] Call Attribute error - Was Re: Tutor Digest, Vol 117, Issue 28

2013-11-17 Thread Alan Gauld
On 17/11/13 12:19, Satheesan Varier wrote: class myclass(): def test(self): print "print this line" if __name__ == '__main__': myclass.run() You can do the test run with an instance of that class, as follows: >>> k=myclass() >>> myclass.test(k) print this li

[Tutor] Link required for difference between class and object

2013-11-17 Thread Reuben
Hi All, It would be nice if someone could forward a link which explains classes and object. I am still struggling to understand classes and objects better. Regards, Reuben ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opt

Re: [Tutor] Tutor Digest, Vol 117, Issue 28

2013-11-17 Thread Satheesan Varier
gt; > Because you didn't write any there. > > -nik > > -- > Wer den Gr?nkohl nicht ehrt, ist der Mettwurst nicht wert! > > PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296 > -- next part -- > A non-text attachment was sc

Re: [Tutor] Class attribute error

2013-11-17 Thread Reuben
Hi, Thanks for correcting me. The solutions mentioned by Dominik and Alan have simplified the concept to me now. Regards, Reuben On Sun, Nov 17, 2013 at 5:25 AM, Dominik George wrote: > On Sat, Nov 16, 2013 at 09:13:13AM -0800, reutest wrote: > > class myclass(): > > > > def test(

Re: [Tutor] basic function concept

2013-11-17 Thread Mark Lawrence
On 17/11/2013 06:31, John Aten wrote: Too bad that doesn't work. On Nov 16, 2013, at 11:16 PM, Alex Kleider wrote: On 2013-11-16 13:20, Byron Ruffin wrote: def main(x, y, z): print (x, y, z) def funct(): x = 1 y = 2 z = 3 return x, y, z main() Can someone tell me why

Re: [Tutor] loop running twice?

2013-11-17 Thread Alan Gauld
On 17/11/13 01:00, Byron Ruffin wrote: > When this is run it appears that determineMonthsTilSaved is > running twice before the loop ends. It is supposed to run > until saved than goal, but look at the output. You haven't sent the output, just the code... > It runs again even after saved goal.

Re: [Tutor] basic function concept

2013-11-17 Thread Alan Gauld
On 17/11/13 05:16, Alex Kleider wrote: On 2013-11-16 13:20, Byron Ruffin wrote: def main(x, y, z): print (x, y, z) def funct(): x = 1 y = 2 z = 3 return x, y, z main() Can someone tell me why main is not being given any arguments? Because you didn't give it any. Try main

[Tutor] looking for python developper

2013-11-17 Thread sree ganesh
s? > > Because you didn't write any there. > > -nik > > -- > Wer den Gr?nkohl nicht ehrt, ist der Mettwurst nicht wert! > > PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296 > -- next part -- > A non-text attachmen

Re: [Tutor] basic function concept

2013-11-17 Thread John Aten
Too bad that doesn't work. On Nov 16, 2013, at 11:16 PM, Alex Kleider wrote: > On 2013-11-16 13:20, Byron Ruffin wrote: >> def main(x, y, z): >> print (x, y, z) >> def funct(): >> x = 1 >> y = 2 >> z = 3 >> return x, y, z >> main() >> Can someone tell me why main is not being

[Tutor] loop running twice?

2013-11-17 Thread Byron Ruffin
def main(): goal, apr, deposit = getSavingsDetails() determineMonthsTilSaved( goal, apr, deposit ) months = determineMonthsTilSaved(goal, apr, deposit) summarize( months ) def getSavingsDetails(): """ goal = float( input( "Principal sought? $" ) ) apr = float( input(