Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

feel thread

Name: Anonymous 2012-06-03 13:58

that feel when your handwritten linked_list in C is 5 seconds faster than the STL

Name: Anonymous 2012-06-05 17:39

This thread needs more FIOC

class LinkedNode(object):
    def __init__(self, data=None):
        self.data = data
        self.link = None

    def __iter__(self):
        return self

    def next(self):
        if not self.link:
            raise StopIteration
        return self.link

    def append(self, data):
        after = self.link
        self.link = LinkedNode(data)
        self.link.link = after

    def delAfter(self):
        if self.link:
            self.link = self.link.link

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List