xmlclass/xmlclass.py
changeset 2343 33071a451021
parent 2297 96ca6b056c55
child 2431 6923074540dd
equal deleted inserted replaced
2342:4ec6d6cd23ca 2343:33071a451021
   625         else:
   625         else:
   626             def initial_value():
   626             def initial_value():
   627                 value = infos["elmt_type"]["initial"]()
   627                 value = infos["elmt_type"]["initial"]()
   628                 if infos["type"] != ANY:
   628                 if infos["type"] != ANY:
   629                     DefaultElementClass.__setattr__(value, "tag", element_name)
   629                     DefaultElementClass.__setattr__(value, "tag", element_name)
   630                     value._init_()
       
   631                 return value
   630                 return value
   632         return [initial_value() for dummy in xrange(infos["minOccurs"])]
   631         return [initial_value() for dummy in xrange(infos["minOccurs"])]
   633     else:
   632     else:
   634         return []
   633         return []
   635 
   634