SourceForge.net Logo

Open-Commerce Logo

Package Database.Util


Functions

def deleteDoubledInList
def subtractList
def addList
def addOnceEachItem
def getDictRangeSelection


Function Documentation

def Database.Util.addList (   first_list,
  second_list 
)

  add each existing element of first_list present
  in the second like :
  ["richard", 4] & ["richard", 8] return ["richard",]
  ("richard", 4) & ("richard", 8) return ("richard",)

def Database.Util.addOnceEachItem (   first_list,
  second_list 
)

  add each existing element of first_list present
  in the second like :
  ["richard", 4] & ["richard", 8] return ["richard",4,8]
  ("richard", 4) & ("richard", 8) return ("richard",4,8)

def Database.Util.deleteDoubledInList (   ilist  ) 

Delete each already existing object in given ilist

def Database.Util.getDictRangeSelection (   dictionary,
  start = None,
  stop = None 
)

This method allow you to obtain a part of a dict
for exemple :
  { "organisation" : (1,2,3), "person:(3,4,5)"}
have 6 item. You could have the first four item by using:
  getDictRangeSelection({ "organisation" : (1,2,3), "person:(3,4,5)"},
                        start = 0
                        stop = 3)
method will return :
  { "organisation" : (1,2,3), "person:(3,)}

def Database.Util.subtractList (   first_list,
  second_list 
)

  subtract each existing element of first_list present
  in the second like :
  ["richard", 4] - ["richard", 8] return [4,]
  ("richard", 4) - ("richard", 8) return (4,)


Generated on Sat Feb 16 09:03:03 2008 for OpenCommerce by  doxygen 1.5.3