class pid:
    "pid"
    def add(original_pid,toadd):
        "add pid"
        original_pid.append(toadd)
        return original_pid
    def remove(something_to_remove_from,what):
        "remove pid"
        something_to_remove_from.remove(what)
        return something_to_remove_from
    def modify(source,element,changewiththis):
        "modify pid"
        source[source.index(element)]=changewiththis
        return source

class test(pid):
    pid.original=[1,2,3]
    pid.toadd=4
    pid.add(pid.original,pid.toadd) # error here says that
                                    # it expects pid instance as first arg
                                    # not a list that it got.

why do i get an error?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to