xsdata
xsdata copied to clipboard
PEP 604: Write union types as X | Y
Ever since Python 3.10, where PEP 604 was implemented, the recommended way of writing union type hints is no longer Union[X, Y], but instead X | Y. The same thing goes for str | None replacing Optional[str]. It would be great to see this update in the dataclasses generated by xsdata.
It's coming, waiting for 3.9 eol.