| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Comparing to the solution suggested in #4016, this should bear no performance penalty when pretty_print=False (which is the default). On the other hand, it is not suitable for processing of large XML data. Then some alternative solution (e.g., lxml module) must be used.
| enc_lower = encoding.lower() | ||
|
|
||
| if pretty_print: | ||
| self._indent(self._root) |
There was a problem hiding this comment.
Sorry, but write() is an output method. It shouldn't have side-effects that change the tree.
Just imagine you'd print or log the tree for debugging purposes and it would alter the serialised result later on.
Sorry, something went wrong.
|
Rejecting this PR in its current form, because it adds a side-effect to an otherwise pure output function. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Comparing to the solution suggested in #4016, this should bear no performance penalty when pretty_print=False (which is the default). On the other hand, it is not suitable for processing of large XML data. Then some alternative solution (e.g., lxml module) must be used.
https://bugs.python.org/issue14465