Public Member Functions | |
def | __add__ |
def | __cmp__ |
def | __delitem__ |
def | __delslice__ |
def | __getitem__ |
def | __getslice__ |
def | __init__ |
def | __len__ |
def | __radd__ |
def | __repr__ |
def | __setitem__ |
def | __setslice__ |
def | append |
def | check |
def | clear |
def | copy |
def | count |
def | extend |
def | filter |
def | get |
def | has_key |
def | index |
def | insert |
def | items |
def | keys |
def | map |
def | pop |
def | push |
def | reduce |
def | remove |
def | reverse |
def | slice |
def | sort |
def | split |
def | swap |
def | update |
def | values |
Public Attributes | |
dict | |
list |
Definition at line 7 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__init__ | ( | self, | |
List = [] , |
|||
Dict = {} |
|||
) |
Definition at line 8 of file seqvaluedict.py.
00008 {}): 00009 if type(List)==type({}): 00010 self.list = List.keys() 00011 self.dict = List.copy() 00012 elif List and not Dict: 00013 self.list=[] 00014 self.dict={} 00015 for i,j in List: 00016 self.list.append(i) 00017 self.dict[i]=j 00018 elif type(List)==type(Dict)==type([]): 00019 self.list = List 00020 self.dict = {} 00021 for key,value in map(None,List,Dict): 00022 self.dict[key] = value 00023 else: 00024 self.list,self.dict = List[:],Dict.copy() 00025
def python::seqvaluedict::seqdict::__add__ | ( | self, | |
other | |||
) |
Definition at line 96 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__cmp__ | ( | self, | |
other | |||
) |
Definition at line 44 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__delitem__ | ( | self, | |
key | |||
) |
Definition at line 57 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__delslice__ | ( | self, | |
start, | |||
stop | |||
) |
Definition at line 91 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__getitem__ | ( | self, | |
key | |||
) |
Definition at line 46 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__getslice__ | ( | self, | |
start, | |||
stop | |||
) |
Definition at line 60 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__len__ | ( | self | ) |
Definition at line 131 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__radd__ | ( | self, | |
other | |||
) |
Definition at line 101 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__repr__ | ( | self | ) |
Definition at line 173 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__setitem__ | ( | self, | |
key, | |||
value | |||
) |
Definition at line 53 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::__setslice__ | ( | self, | |
start, | |||
stop, | |||
newdict | |||
) |
Definition at line 67 of file seqvaluedict.py.
00068 : 00069 start = max(start,0); stop = max(stop,0) 00070 delindexes = [] 00071 for key in newdict.keys(): 00072 if self.dict.has_key(key): 00073 index = self.list.index(key) 00074 delindexes.append(index) 00075 if index < start: 00076 start = start - 1 00077 stop = stop - 1 00078 elif index >= stop: 00079 pass 00080 else: 00081 stop = stop - 1 00082 delindexes.sort() 00083 delindexes.reverse() 00084 for index in delindexes: 00085 key = self.list[index] 00086 del self.dict[key] 00087 del self.list[index] 00088 for key in self.list[start:stop]: 00089 del self.dict[key] 00090 self.list[start:stop] = newdict.list[:] self.update(newdict.dict)
def python::seqvaluedict::seqdict::append | ( | self, | |
key, | |||
value | |||
) |
Definition at line 26 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::check | ( | self | ) |
Definition at line 31 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::clear | ( | self | ) |
Definition at line 37 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::copy | ( | self | ) |
Definition at line 39 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::count | ( | self, | |
value | |||
) |
Definition at line 106 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::extend | ( | self, | |
other | |||
) |
Definition at line 109 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::filter | ( | self, | |
function | |||
) |
Definition at line 111 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::get | ( | self, | |
key, | |||
failobj = None |
|||
) |
Definition at line 117 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::has_key | ( | self, | |
key | |||
) |
Definition at line 122 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::index | ( | self, | |
key | |||
) |
Definition at line 119 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::insert | ( | self, | |
i, | |||
x | |||
) |
Definition at line 120 of file seqvaluedict.py.
00120 :self.__setslice__(i,i,x)
def python::seqvaluedict::seqdict::items | ( | self | ) |
Definition at line 121 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::keys | ( | self | ) |
Definition at line 123 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::map | ( | self, | |
function | |||
) |
Definition at line 124 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::pop | ( | self, | |
key = None |
|||
) |
Definition at line 132 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::push | ( | self, | |
key, | |||
value | |||
) |
Definition at line 141 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::reduce | ( | self, | |
function, | |||
start = None |
|||
) |
Definition at line 143 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::remove | ( | self, | |
key | |||
) |
Definition at line 145 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::reverse | ( | self | ) |
Definition at line 148 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::slice | ( | self, | |
From, | |||
To = None , |
|||
Step = 1 |
|||
) |
Definition at line 165 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::sort | ( | self, | |
args | |||
) |
Definition at line 149 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::split | ( | self, | |
function, | |||
Ignore = None |
|||
) |
Definition at line 150 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::swap | ( | self | ) |
Definition at line 159 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::update | ( | self, | |
newdict | |||
) |
Definition at line 162 of file seqvaluedict.py.
def python::seqvaluedict::seqdict::values | ( | self | ) |
Definition at line 126 of file seqvaluedict.py.
Definition at line 8 of file seqvaluedict.py.
Definition at line 8 of file seqvaluedict.py.