Eryk Sun <eryk...@gmail.com> added the comment:

> Isn't `PyUnicode_GET_LENGTH(text) < self->chunk_size` enough?

Yes, that's simpler, except with `<=`" instead of `<`, since the maximum count 
is chunk_size when pending_bytes is a list or ASCII string. When I wrote the 
more complex check, I did't take into account that pending_bytes would be 
flushed anyway if it causes pending_bytes_count to exceed chunk_size.

----------

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

Reply via email to