Re: [Tutor] Which libraries for Python 2.5.2 [SOLVED]

2012-01-01 Thread Wayne Watson
This problem was solved when my wife noticed that there was a second install disk for the 5 year old XP zx6000 PC she had given me, which I will now give to a friend. The problem originally was a missing dll that Python wanted. All is well now. -- Wayne Watson (Watson Adventures,

[Tutor] Class vs. instance

2012-01-01 Thread Stayvoid
Hi there! >>> class Sample: >>> def method(self): pass >>> Sample().method() What's the difference between class __main__.Sample and __main__.Sample instance? Why should I write "Sample().method" instead of "Sample.method"? Cheers! ___ Tutor mail

Re: [Tutor] Class vs. instance

2012-01-01 Thread Hugo Arts
On Sun, Jan 1, 2012 at 8:40 PM, Stayvoid wrote: > Hi there! > class Sample:     def method(self): pass > Sample().method() > > What's the difference between class __main__.Sample and > __main__.Sample instance? > Why should I write "Sample().method" instead of "Sample.method"? > Th

Re: [Tutor] Class vs. instance

2012-01-01 Thread Stayvoid
Thanks. I totally get it now. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] while loop ends prematurly

2012-01-01 Thread brian arb
Hello, Can some please explain this to me? My while loop should continue while "owed" is greater than or equal to "d" first time the function is called the loop exits as expected False: 0.00 >= 0.01 the next time it does not False: 0.01 >= 0.01 Below is the snippet of code, and th

Re: [Tutor] while loop ends prematurly

2012-01-01 Thread Dave Angel
On 01/01/2012 09:48 PM, brian arb wrote: Hello, Can some please explain this to me? My while loop should continue while "owed" is greater than or equal to "d" first time the function is called the loop exits as expected False: 0.00>= 0.01 the next time it does not False: 0.01>= 0.010

Re: [Tutor] while loop ends prematurly

2012-01-01 Thread Hugo Arts
On Mon, Jan 2, 2012 at 3:48 AM, brian arb wrote: > Hello, > Can some please explain this to me? > My while loop should continue while "owed" is greater than or equal to "d" > > first time the function is called > the loop exits as expected > False: 0.00 >= 0.01 > the next time it does not

Re: [Tutor] while loop ends prematurly

2012-01-01 Thread Steven D'Aprano
Dave Angel wrote: Easiest answer is to use integers. Scale everything up by a factor of 100, and you won't need floats at all. Just convert when printing (and even then you may get into trouble). Another answer is to use Decimal class, which CAN represent decimal values exactly. That onl