Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'''base array element'''
import ptype,utils
class __parray_generic(ptype.pcontainer):
'''provides the generic features expected out of an array'''
def __contains__(self,v):
for x in self.value:
if x is v:
return True
return False
def __len__(self):
if not self.initialized:
return int(self.length)
return len(self.value)
# XXX: update offsets (?)
def insert(self, index, object):
self.value.insert(index, object)