Kai Groner added the comment:

I agree that there isn't a way to know if a header should be added implicitly, 
until Generator is called.

A possible change to the Generator behavior is to generate the header in the 
serialized output, without modifying the original.  I don't know that it makes 
debugging easier, but it would keep the Generator from having this side effect.

Maybe being explicit is better, a utility factory could be used to keep the 
common case simple.  I don't know if such a change is reasonable at this point.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25235>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to