Re: an error

2016-07-18 Thread Chris Angelico
On Tue, Jul 19, 2016 at 4:37 PM, WePlayGames WeEnjoyIt wrote: > Τη Τρίτη, 19 Ιουλίου 2016 - 9:32:34 π.μ. UTC+3, ο χρήστης Chris Angelico > έγραψε: >> On Tue, Jul 19, 2016 at 4:26 PM, WePlayGames WeEnjoyIt >> wrote: >> > thanks chris for responding, it doesnt say anything else just syntax error >

Re: an error

2016-07-18 Thread WePlayGames WeEnjoyIt
Τη Τρίτη, 19 Ιουλίου 2016 - 9:32:34 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > On Tue, Jul 19, 2016 at 4:26 PM, WePlayGames WeEnjoyIt > wrote: > > thanks chris for responding, it doesnt say anything else just syntax error > > it have seen this error again when im using the for loop and it seem

Re: an error

2016-07-18 Thread Chris Angelico
On Tue, Jul 19, 2016 at 4:26 PM, WePlayGames WeEnjoyIt wrote: > thanks chris for responding, it doesnt say anything else just syntax error > it have seen this error again when im using the for loop and it seems like > when i delete everything after total+=1 i get a different error called > UNEXP

Re: an error

2016-07-18 Thread WePlayGames WeEnjoyIt
Τη Τρίτη, 19 Ιουλίου 2016 - 9:20:20 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > On Tue, Jul 19, 2016 at 4:07 PM, WePlayGames WeEnjoyIt > wrote: > > the problem with this is that i get an syntax error at the very end at the > > TOTAL+=1 when i delete this it tells me that there is an error at t

Re: an error

2016-07-18 Thread Ian Kelly
On Tue, Jul 19, 2016 at 12:07 AM, WePlayGames WeEnjoyIt wrote: >pygame1.blit(image3,(143,146) This line is missing a closing parenthesis. -- https://mail.python.org/mailman/listinfo/python-list

Re: an error

2016-07-18 Thread Chris Angelico
On Tue, Jul 19, 2016 at 4:07 PM, WePlayGames WeEnjoyIt wrote: > the problem with this is that i get an syntax error at the very end at the > TOTAL+=1 when i delete this it tells me that there is an error at the > clockfps.tick(fps) thing what the heck is going on :p > When you get an error, Pyt

an error

2016-07-18 Thread WePlayGames WeEnjoyIt
while True: for event in pygame.event.get(): if event.type==pygame.QUIT: pygame.quit() sys.exit() pygame1.blit(image1,(0,0)) print ("choose from 0-8") p1=int(input()) while p1>8 or p1<0 or list_b[p1]=="X" or list_b[p1]=="O": print ("wtf bro") p1=int(input()) list_b[p1]

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Chris Angelico
On Tue, Jul 19, 2016 at 2:58 PM, Rustom Mody wrote: > Analogy: > Mutable default parameters are a source of problem and confusion. > > No A says. One can use them to simulate statics > > No B says No problem as long as you make sure there is no mutation to the > mutable, either inside or outside

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Chris Angelico
On Tue, Jul 19, 2016 at 1:42 PM, Steven D'Aprano wrote: >> And then you get these sorts of functions: >> >> EPSILON = 0.01 # Adjust to control numeric accuracy >> def is_equal(f1, f2, epsilon=EPSILON): >> if abs(f1) > abs(f2): >> f1, f2 = f2, f1 >> return abs(f2-f1) < f1*epsilo

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Tuesday, July 19, 2016 at 9:12:57 AM UTC+5:30, Steven D'Aprano wrote: > On Mon, 18 Jul 2016 08:15 pm, Chris Angelico wrote: > > > On Mon, Jul 18, 2016 at 8:00 PM, Marko Rauhamaa wrote: > >> Python programmers (among others) frequently run into issues with > >> surprising results in floating-poi

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Steven D'Aprano
On Mon, 18 Jul 2016 08:15 pm, Chris Angelico wrote: > On Mon, Jul 18, 2016 at 8:00 PM, Marko Rauhamaa wrote: >> Python programmers (among others) frequently run into issues with >> surprising results in floating-point arithmetics. For better or worse, >> Scheme has tried to abstract the concept.

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Tuesday, July 19, 2016 at 8:46:44 AM UTC+5:30, Steven D'Aprano wrote: > On Tue, 19 Jul 2016 10:36 am, Rustom Mody wrote: > > > I recollect — school physics textbook so sorry no link — > > that in the Newton gravitation law > > f = -GMm/r² > > > > there was a discussion about the exponent of r

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Steven D'Aprano
On Mon, 18 Jul 2016 11:25 pm, Random832 wrote: > On Mon, Jul 18, 2016, at 00:46, Ben Finney wrote: >> What is “those”? The measurement is imprecise, the observations are >> inexact. >> >> It makes no sense to say that a number is inexact. Exactness is not a >> property of a number. > > There's n

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Steven D'Aprano
On Tue, 19 Jul 2016 10:36 am, Rustom Mody wrote: > I recollect — school physics textbook so sorry no link — > that in the Newton gravitation law > f = -GMm/r² > > there was a discussion about the exponent of r ie 2 > And that to some 6 decimal places it had been verified that it was > actually 2

Re: Request for help

2016-07-18 Thread Steven D'Aprano
On Tue, 19 Jul 2016 06:20 am, alister wrote: > I suggest next time you stay awake during lessons. That's an uncalled for nasty comment. You don't know the O.P's issues or why he is having difficulty. -- Steven “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, t

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Steven D'Aprano
On Tue, 19 Jul 2016 01:25 am, Ian Kelly wrote: > On Mon, Jul 18, 2016 at 3:29 AM, Steven D'Aprano > wrote: >> On Monday 18 July 2016 14:16, Rustom Mody wrote: >>> In short one could think of inexact and exact — in scheme's intended >>> semantics — as better called scientific (or science-ic) and m

Re: can't add variables to instances of built-in classes

2016-07-18 Thread Lawrence D’Oliveiro
On Tuesday, July 19, 2016 at 11:12:52 AM UTC+12, bream...@gmail.com wrote: > > On Monday, July 18, 2016 at 10:48:15 PM UTC+1, Lawrence D’Oliveiro wrote: >> >> >> When you have lots of read/write properties, I find __slots__ to be a good >> idea. > > Please explain

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Tuesday, July 19, 2016 at 12:28:36 AM UTC+5:30, Marko Rauhamaa wrote: > Ian Kelly : > > > Okay, so how is that wavelength defined? > > > > If you needed to mark a meter stick, and all you had was the > > definition of c and the second, how would you do it without measuring > > anything? > > I

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Ben Finney
Random832 writes: > On Mon, Jul 18, 2016, at 00:46, Ben Finney wrote: > > What is “those”? The measurement is imprecise, the observations are > > inexact. > > > > It makes no sense to say that a number is inexact. Exactness is not > > a property of a number. > > There's no reason it shouldn't be

Re: can't add variables to instances of built-in classes

2016-07-18 Thread Lawrence D’Oliveiro
On Monday, July 18, 2016 at 7:39:09 PM UTC+12, Peter Otten wrote: > Lawrence D’Oliveiro wrote: > >> I find __slots__ very useful. I have them right through my Qahirah classes >> , for example. > > Or is there something I didn't think of that makes them useful for y

Re: Request for help

2016-07-18 Thread alister
On Mon, 18 Jul 2016 12:50:04 +0300, Eric kago wrote: > Hi Pythoners > > I need help in understanding hoe to put up the code to the following > command > > >- Create a constructor that takes in an integer and assigns this to a >`balance` property > > > > > Regards, > > Eric Kago +25

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Marko Rauhamaa
Ian Kelly : > Okay, so how is that wavelength defined? > > If you needed to mark a meter stick, and all you had was the > definition of c and the second, how would you do it without measuring > anything? I wouldn't be measuring a meter stick. To measure, say, the height of a desk, I would bring i

Re: Request for help

2016-07-18 Thread Eric kago
Hi Pythoners I need help in understanding hoe to put up the code to the following command - Create a constructor that takes in an integer and assigns this to a `balance` property Regards, Eric Kago +254(0)714249373 Nairobi Kenya -- https://mail.python.org/mailman/listinfo/python-list

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Ian Kelly
On Mon, Jul 18, 2016 at 9:55 AM, Marko Rauhamaa wrote: > Marko Rauhamaa : > >> Ian Kelly : >>> Off-topic, c being a fundamental constant is actually in the latter >>> category. Its *exact* value is 299792458 m/s. >>> >>> The length of the meter, on the other hand, is defined as the distance >>> tr

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Marko Rauhamaa
Marko Rauhamaa : > Ian Kelly : >> Off-topic, c being a fundamental constant is actually in the latter >> category. Its *exact* value is 299792458 m/s. >> >> The length of the meter, on the other hand, is defined as the distance >> traveled by light in a vacuum in 1/299792458 seconds and is subject

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Marko Rauhamaa
Ian Kelly : > Off-topic, c being a fundamental constant is actually in the latter > category. Its *exact* value is 299792458 m/s. > > The length of the meter, on the other hand, is defined as the distance > traveled by light in a vacuum in 1/299792458 seconds and is subject to > the precision of m

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Ian Kelly
On Mon, Jul 18, 2016 at 3:29 AM, Steven D'Aprano wrote: > On Monday 18 July 2016 14:16, Rustom Mody wrote: >> In short one could think of inexact and exact — in scheme's intended >> semantics — as better called scientific (or science-ic) and mathematic >> numbers. > > I don't think so. "Science" u

COM Server - COMTYPES / PYTHONCOM

2016-07-18 Thread Kasper Jepsen
Hello all, I have some major problems with something i am not good at :( I have come to a situation where i have to add a COM server in my python code the get access to it from Labview Teststand. Firs i have tried with pythoncom/wincom and got it almost working, it registered and i could look

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Random832
On Mon, Jul 18, 2016, at 01:37, Rustom Mody wrote: > The INTENTION is that in addition to capturing the usual number tower > ℕ ⊂ ℤ ⊂ ℝ (or parts therefore) Well, ℚ. You hardly ever see representations of numbers that are in ℝ-ℚ. > scheme also captures ORTHOGONALLY (word in the docs) the (in)exact

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Random832
On Mon, Jul 18, 2016, at 00:46, Ben Finney wrote: > What is “those”? The measurement is imprecise, the observations are > inexact. > > It makes no sense to say that a number is inexact. Exactness is not a > property of a number. There's no reason it shouldn't be a property of an object of a numer

Re: can't add variables to instances of built-in classes

2016-07-18 Thread Ethan Furman
On 07/17/2016 04:50 AM, Wilson Ong wrote: Use this feature sparingly, only when you know that there are going to be many (millions rather than thousands) of Test instances. Why use it sparingly? Is it for extensibility? What if I'm pretty sure that my class is going to have exactly these attr

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Peter Otten
Marko Rauhamaa wrote: > Chris Angelico : >> you don't need an infinite amount of paper, except that they work with >> binary rather than decimal, so people think "0.1 + 0.2 ought to be >> exactly 0.3, why isn't it??", and blame floats. > > Oh, if we only had eight fingers on our hand... We alrea

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Marko Rauhamaa
Chris Angelico : > you don't need an infinite amount of paper, except that they work with > binary rather than decimal, so people think "0.1 + 0.2 ought to be > exactly 0.3, why isn't it??", and blame floats. Oh, if we only had eight fingers on our hand... Scheme, though doesn't force the impleme

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Chris Angelico
On Mon, Jul 18, 2016 at 8:24 PM, Rustom Mody wrote: > I dont know what point you are trying to make > Here is behavior. Should one use == ?? > > Python 2.7.11+ (default, Apr 17 2016, 14:00:29) > [GCC 5.3.1 20160413] on linux2 > Type "help", "copyright", "credits" or "license" for more information

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Monday, July 18, 2016 at 3:45:26 PM UTC+5:30, Chris Angelico wrote: > On Mon, Jul 18, 2016 at 8:00 PM, Marko Rauhamaa wrote: > > Python programmers (among others) frequently run into issues with > > surprising results in floating-point arithmetics. For better or worse, > > Scheme has tried to a

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Chris Angelico
On Mon, Jul 18, 2016 at 8:00 PM, Marko Rauhamaa wrote: > Python programmers (among others) frequently run into issues with > surprising results in floating-point arithmetics. For better or worse, > Scheme has tried to abstract the concept. You don't need to explain the > ideas of IEEE 64-bit float

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Monday, July 18, 2016 at 2:59:56 PM UTC+5:30, Steven D'Aprano wrote: > On Monday 18 July 2016 14:16, Rustom Mody wrote: > > AIUI… > > There are two almost completely unrelated notions of exact > > > > 1. ⅓ in decimal cannot be exactly represented though 0.3 0.33 etc are > > approximations. > >

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Marko Rauhamaa
Steven D'Aprano : > I think one could better think of Scheme's semantics as a > poorly-thought out hybrid between traditional numerics and a vague > approximation to interval arithmetic. Python programmers (among others) frequently run into issues with surprising results in floating-point arithme

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Steven D'Aprano
On Monday 18 July 2016 14:16, Rustom Mody wrote: > On Saturday, July 16, 2016 at 3:16:48 PM UTC+5:30, Steven D'Aprano wrote: >> But that's *wrong*. Numbers are never inexact. (You can have interval >> arithmetic using "fuzzy numbers", but they're ALWAYS inexact.) It is >> calculations which are e

Re: Python code change

2016-07-18 Thread alister
On Sun, 17 Jul 2016 12:00:58 -0700, tsanchez117.ts wrote: > Im trying to run a Python application but im stuck on a problem. The > application requires a log in and password to run the application. The > only problem that I'm having is that the code was written to connect to > a data base and from

Re: can't add variables to instances of built-in classes

2016-07-18 Thread Peter Otten
Lawrence D’Oliveiro wrote: > On Monday, July 18, 2016 at 3:04:13 AM UTC+12, Steven D'Aprano wrote: > >> __slots__ is not obsolete, but 99% of the time you shouldn't bother with >> it. > > I find __slots__ very useful. I have them right through my Qahirah classes >