Re: [Tutor] List problem

2011-07-25 Thread Peter Otten
David Merrick wrote: > def append(self,item): > '''Adds an item to the end of the List''' > > current = self.head > previous = None > while current.getNext() != None: > previous = current > current = current.getNext() > if

Re: [Tutor] List problem

2011-07-24 Thread Andre Engels
On Mon, Jul 25, 2011 at 4:19 AM, David Merrick wrote: > def append(self,item): > '''Adds an item to the end of the List''' > > current = self.head > previous = None > while current.getNext() != None: > previous = current > current

Re: [Tutor] List problem

2011-07-24 Thread bob gailer
I have no desire to wade through all that code. Please post the entire traceback. On 7/24/2011 10:19 PM, David Merrick wrote: class Node: def __init__(self,initdata): self.data = initdata self.next = None def getData(self): return self.data def getNext(sel

Re: [Tutor] list problem

2007-02-21 Thread Kent Johnson
> Kirk Bailey wrote: >> ok, here comes some code: >> >> f1=open(pagename,'r') >> page=f1.readlines() >> f1.close() >> >> at the end of which, the data is in page, which is a list. But >> something strange is going on here. all the data is in a single cell! >> it's a one cell list! Say what? It s

Re: [Tutor] list problem

2007-02-21 Thread Michael Lange
On Wed, 21 Feb 2007 21:21:26 +1300 "John Fouhy" <[EMAIL PROTECTED]> wrote: > > Kirk Bailey wrote: > > > ok, here comes some code: > > > > > > f1=open(pagename,'r') > > > page=f1.readlines() > > > f1.close() > > > > > > at the end of which, the data is in page, which is a list. But > > > something

Re: [Tutor] list problem

2007-02-21 Thread John Fouhy
> Kirk Bailey wrote: > > ok, here comes some code: > > > > f1=open(pagename,'r') > > page=f1.readlines() > > f1.close() > > > > at the end of which, the data is in page, which is a list. But > > something strange is going on here. all the data is in a single cell! > > it's a one cell list! Say what

Re: [Tutor] list problem

2007-02-20 Thread Luke Paireepinart
Kirk: Please reply to this message, not the other one I sent, and please reply on-list in the future, using the 'reply-all' button rather than 'reply.' Otherwise the message just goes to me instead of to everyone, which is the default on this list. This copy of your e-mail is forwarded to the lis

Re: [Tutor] list problem

2007-02-20 Thread Rikard Bosnjakovic
On 2/21/07, Kirk Bailey <[EMAIL PROTECTED]> wrote: [...] > Discussion on or off list is saught. Constructive criticism will be > graciously received and thanked. Without links, pointers, code or anything grippable I find it difficult to comment or discuss anything, since i haven't got the faintes

Re: [Tutor] list problem

2007-02-20 Thread Luke Paireepinart
Kirk Bailey wrote: > ok, getting back to python and wikiness, I have a problem, this software > of mine seems to exibit different behavior under the latest edition of > python (2.5) than under the version used when I first wrote it (2.3). > > It loads the page file, but returns it as a list (whic