Commit 87473d66 authored by Michele Maris's avatar Michele Maris
Browse files

u

parent e73c438e
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -187,15 +187,22 @@ class cookies_collection :
        return self._list.keys()
    #
    def __setitem__(self,this,that) :
        print(type(that),type(cookie()),type(that)==type(cookie()))
        if type(that) != type({}) and type(that) != type(cookie()) :
            raise Exception(f'content of {this} must be a dictionary or a cookie')
        if type(that) == type({}) :
            ic=cookie()
            ic.from_dict(that)
            self._list[this]=ic
        else :
            self._list[this]=that
            ic=that
        if this is None :
            n=ic.name
        elif type(this)!=type('') :
            raise Exception('this must be a string')
        elif this.strip() == '' :
            n=ic.name
        else :
            n=this.strip()
        self._list[n]=ic
    #
    def __getitem__(self,this) :
        if type(this) == type(int) :