xmlclass/xmlclass.py
changeset 2429 15f18dc8b56a
parent 2343 33071a451021
child 2431 6923074540dd
equal deleted inserted replaced
2428:e0f16317668e 2429:15f18dc8b56a
   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