try to get the current cursor position without removing the node

class List(object):
    ___slot___=('cursor', 'size')
    def __init__(self):
    def __str__(self):
        result = "<"
        node = self.cursor
        count = self.size
        while count != 0:
            result = result + str(
            if count != 1:
                result = result + ", "
            node =
            count -= 1
        result = result + ">"
        return result
class EmptyCircleNode(object):

class CircleNode(object):
    ___slots___=('data', 'next')
    def __init__(self, datavalue,nextnode):
def add(element,circle):
    newNode = CircleNode(element, EmptyCircleNode())
    circle.size +=1
    if isinstance(circle.cursor,EmptyCircleNode):
    elif isinstance(circle.cursor, CircleNode):
        while not isinstance(,EmptyCircleNode):
            cur = = newNode

        raise TypeError("Bad list node")
def remove(circle):
    circle.size -= 1
    if circle.size <= 0:              
        prev = circle.cursor
        for i in range(circle.size-1):
            prev = =

def getCurrentElement(circle):
    cur = circle.cursor
    return cur
#this doesn't work....

What is the problem that you are having? You say on line 57, "this doesn't work". What bit doesn't work? What is exactly the problem? What is it meant to do?

i dont know how to write a function to get current element

You are not calling that function, how do you know it does not work? Looks like you have linked low level data structure. Can you tell if all code is yours and if not what you have added and how have you tested it?