Re: [Tutor] very odd math problem

2011-03-10 Thread Knacktus
Am 11.03.2011 06:05, schrieb Steven D'Aprano: Alex Hall wrote: Hi all, I am trying to get a list of ordered pairs from the below function. In my code, evaluate is more exciting, but the evaluate here will at least let this run. The below runs fine, with one exception: somehow, it is saying that

Re: [Tutor] very odd math problem

2011-03-10 Thread Knacktus
Am 11.03.2011 04:23, schrieb Alex Hall: Hi all, I am trying to get a list of ordered pairs from the below function. In my code, evaluate is more exciting, but the evaluate here will at least let this run. The below runs fine, with one exception: somehow, it is saying that -2+2.0 is 4.x, where x i

Re: [Tutor] very odd math problem

2011-03-10 Thread Steven D'Aprano
Alex Hall wrote: Hi all, I am trying to get a list of ordered pairs from the below function. In my code, evaluate is more exciting, but the evaluate here will at least let this run. The below runs fine, with one exception: somehow, it is saying that -2+2.0 is 4.x, where x is a huge decimal involv

[Tutor] very odd math problem

2011-03-10 Thread Alex Hall
Hi all, I am trying to get a list of ordered pairs from the below function. In my code, evaluate is more exciting, but the evaluate here will at least let this run. The below runs fine, with one exception: somehow, it is saying that -2+2.0 is 4.x, where x is a huge decimal involving E-16 (in other

Re: [Tutor] Need help with dates in Python

2011-03-10 Thread nookasree ponamala
Hi All:   Thanks for all of your answers. I could solve this problem using strptime (datetime.datetime.strptime(dt1, '%Y-%m-%d') and correct indentation.   As I am new to python programming, I don't know how to use classes yet, still learning.   Thanks, Sree.       --- On Thu, 3/10/11, James Rey

Re: [Tutor] Need help with dates in Python

2011-03-10 Thread Francesco Loffredo
On 09/03/2011 9.21, nookasree ponamala wrote: Hi, I need help in finding the minimum date and maximum date in a file. Here is my test file: s.no: dt1 amt id1 id2 452 2010-02-20 $23.26 05954206107 452 2010-02-05 $20.78 05954206107 451

Re: [Tutor] How to sum weighted matrices

2011-03-10 Thread Rafael Durán Castañeda
Numpy apart, you can use lists and loops: >>> matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] >>> matrix2 = [[3, 2, 1], [6, 5, 4], [9, 8, 7]] >>> result = [] >>> w = [1, 2] >>> for x in range(len(matrix)): row =

Re: [Tutor] PyQuery

2011-03-10 Thread David Hutto
pseudo: for line in file: query = {} columnheader = line[0] headercontent = line[1] query[columnheader] = [header1content] ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailm