[Tutor] List of lists help

2008-11-20 Thread btkuhn
Hello, I am completely baffled by this action and would appreciate any help. My problem is occurring within a class which is within a larger program; if I need to post the entire program let me know and I will. It's only about 250 lines so far. Anyways, I am using a list of lists to store dat

Re: [Tutor] List of lists help

2008-11-20 Thread A.T.Hofkamp
[EMAIL PROTECTED] wrote: Hello, I am completely baffled by this action and would appreciate any help. My problem is occurring within a class which is within a larger program; if I need to post the entire program let me know and I will. It's only about 250 lines so far. Anyways, I am using a l

Re: [Tutor] what do you use @staticmethod for?

2008-11-20 Thread Tim Golden
spir wrote: Good night, I have not yet found any use for this feature. Also, I do not really understand the difference with @classmethod, from the programmer's points of view (even if I get the difference on the python side). As I see it, a classmethod is a very ordinary method, except its 'o

Re: [Tutor] List of lists help

2008-11-20 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote self.boardarray[row][col] = self.currentPlayer 4, self.boardarray[2][4] will be set to "2". Instead, the program is setting multiple values within the list as 2. Here is an example output, when I click on (0,0): [[2, 0, 0, 0, 0], [2, 0, 0, 0, 0], [2, 0, 0, 0, 0],

Re: [Tutor] import data (txt/csv) into list/array and manipulation

2008-11-20 Thread trias
Hi, so for this part of the problem it goes a bit like this: I have a CSV file (file1) that contains three columns, column one contains a unique ID type str, columns two and three contain start and stop coordinates type int. the other file (file2) contains two columns, column one contains a

[Tutor] first python program to find citeulike duplicates

2008-11-20 Thread Suresh Krishna
hi everybody, i wrote this to solve the problem of exact duplicate entries in my citeulike library, that i wanted to remove. so i exported my entries in ris format, and then parsed the entries to find exact duplicates based on matching fields. the exact duplicates came about because i uplo

Re: [Tutor] import data (txt/csv) into list/array and manipulation

2008-11-20 Thread A.T.Hofkamp
trias wrote: Hi, so for this part of the problem it goes a bit like this: I have a CSV file (file1) that contains three columns, column one contains a unique ID type str, columns two and three contain start and stop coordinates type int. the other file (file2) contains two columns, column

Re: [Tutor] first python program to find citeulike duplicates

2008-11-20 Thread A.T.Hofkamp
Suresh Krishna wrote: it works (i think), but since this is my very first python program, i would really appreciate feedback on how the program could be improved.. First of all, welcome, new Python programmer, My main trouble with the program is lack of structure, some lines deal with indivi

Re: [Tutor] Scrolling through output in shell

2008-11-20 Thread Simón A. Ruiz
Lie Ryan wrote: As the manpage of "less" explains: 'less - opposite of more' I've always heard it explained that "more" is the original paging program of UNIX, and when a new pager was created (by GNU?) they named it "less" because, as we all know, "less is more"[1]. Simón [1] http://www.p

Re: [Tutor] Scrolling through output in shell

2008-11-20 Thread Simón A. Ruiz
Lie Ryan wrote: As the manpage of "less" explains: 'less - opposite of more' I've always heard it explained that "more" is the original paging program of UNIX, and when a new pager was created (by GNU?) they named it "less" because, as we all know, "less is more"[1]. Simón [1] http://www.p

Re: [Tutor] List of lists help

2008-11-20 Thread Mark Tolonen
"Alan Gauld" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] Something like L = [[0,0,0] *3] I think you meant: [[0,0,0]]*3 [[0, 0, 0], [0, 0, 0], [0, 0, 0]] -Mark Now L contains 3 copies of the same list so when you change any one copy it is reflected in all of

[Tutor] [Fwd: Re: what do you use @staticmethod for?]

2008-11-20 Thread spir
[forwarded to the list] Thank you for your answers. I found Tim's example below especially helpful. Still, I am a bit surprised. Would you agree with the following: -1- Methods are usually defined as functions "bound to" an object, often called 'owner', meaning especially that the object is then

Re: [Tutor] what do you use @staticmethod for?

2008-11-20 Thread ALAN GAULD
Forwarded to group. > Would you mind telling me what you think of the following? > > /Inside/ class definition, conflict may happen between class > an instance attributes. > Non-callable attributes (say, properties) are diffenreciated using the > syntactic convention that instance properties ar

Re: [Tutor] List of lists help

2008-11-20 Thread Alan Gauld
"Mark Tolonen" <[EMAIL PROTECTED]> wrote L = [[0,0,0] *3] I think you meant: [[0,0,0]]*3 [[0, 0, 0], [0, 0, 0], [0, 0, 0]] Yes indeed, to much haste and not enough testing! Alan G ___ Tutor maillist - Tutor@python.org http://mail.python.o

[Tutor] Decimal fixed point representation

2008-11-20 Thread Dinesh B Vadhia
I'm trying to get my head around the Decimal module to understand how to represent a decimal floating point number as an integer (or integers). Am I barking mad or is this possible? Dinesh ___ Tutor maillist - Tutor@python.org http://mail.python.or

Re: [Tutor] Decimal fixed point representation

2008-11-20 Thread bob gailer
Dinesh B Vadhia wrote: I'm trying to get my head around the Decimal module to understand how to represent a decimal floating point number as an integer (or integers). Huh? That makes no sense to me! Examples please. -- Bob Gailer Chapel Hill NC 919-636-4239

Re: [Tutor] Decimal fixed point representation

2008-11-20 Thread Alan Gauld
"Dinesh B Vadhia" <[EMAIL PROTECTED]> wrote I'm trying to get my head around the Decimal module to understand how to represent a decimal floating point number as an integer (or integers). I'm not sure what you mean by that. Is it the use of the Decimal module you are querying? Is it how