class is a reserved word, consider using _class to replace class
Closed this issue · 2 comments
geektutu commented
<?xml version="1.0"?>
<root>
<class>Moc</class>>
</root>
doc = untangle.parse("test.xml")
print(doc.root.class)
# print(doc.root.class)
# ^
# SyntaxError: invalid syntax
class is a reserved word, consider using _class to replace class
mhadam commented
Agreed, ran into this issue where an element is named None
.
Edit:
Realized you can use getattr(o, "None")
in the meantime, though will try to make a PR for this issue when I get the chance.