On Mon, Jul 25, 2011 at 4:19 AM, David Merrick <merrick...@gmail.com> 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 current.getNext() == None: > previous = previous.setNext(current) > current = current.setNext(item) > current is here the first element of your list. This element does not have a getNext() method. Instead, if you want to use this system, you'll have to use a (probably re-defined) getNext() method of your list class itself. -- André Engels, andreeng...@gmail.com
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor