def some_function root et Element page try context root iterfind conte

1
2
3
4
5
6
7
8
def some_function():
root = et.Element('page')
try:
context = root.iterfind('context').next()
except StopIteration:
context = et.Element('context')
root.append(context)
return None