def __init__(self, sourceCollection=None): """Sets the initial state of self, which includes the contents of sourceCollection, if it's present.""" self._items = Array(ArrayBag.DEFAULT_CAPACITY) AbstractBag.__init__(self, sourceCollection) if sourceCollection: for item in sourceCollection: self.add(item)
def __init__(self, sourceCollection=None): """Sets the initial state of self, which includes the contents of sourceCollection, if it's present.""" self._items = LinkedBST() AbstractBag.__init__(self, sourceCollection) if not self._items.isBalanced(): self._items.rebalance()
def __init__(self, sourceCollection = None): """Sets the initial state of self, which includes the contents of sourceCollection, if it's present. **Items will be in reverse order of sourceCollection! """ if AbstractBag.TRACE: print("linkedbag's __init__") self._items = None AbstractBag.__init__(self, sourceCollection) #calls init of parent class
def __init__(self, sourceCollection=None): """Sets the initial state of self, which includes the contents of sourceCollection, if it's present.""" self._items = None AbstractBag.__init__(self, sourceCollection)
def __init__(self, sourceCollection=None): self._items = None AbstractBag.__init__(self, sourceCollection)
def __init__(self, sourceCollection=None): """Sets the initial state of self, which includes the contents of sourceCollection, if it's present.""" self._items = Array(ArrayBag.DEFAULT_CAPACITY) self._targetIndex = -1 AbstractBag.__init__(self, sourceCollection)
def __init__(self, sourceCollection = None): """Sets the initial state of self, which includes the contents of sourceCollection, if it's present.""" self._items = Array(ArrayBag.DEFAULT_CAPACITY) AbstractBag.__init__(self, sourceCollection)
def __init__(self, sourceCollection=None): AbstractArray.__init__(self) AbstractBag.__init__(self, sourceCollection)
def __int__(self, sourceCollection = None): self._items = Array(Arraybag.DEFAULT_CAPACITY) AbstractBag.__init__(self, sourceCollection)
def __init__(self, sourceCollection=None): """初始化""" self._items = Array(ArrayBag.DEFALUT_SIZE) AbstractBag.__init__(self, sourceCollection)