diff options
Diffstat (limited to 'Lib/asyncio/streams.py')
-rw-r--r-- | Lib/asyncio/streams.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 3da1d10fac..8fc21474e9 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -293,6 +293,10 @@ class StreamReader: if not waiter.cancelled(): waiter.set_result(True) + def at_eof(self): + """Return True if the buffer is empty and 'feed_eof' was called.""" + return self._eof and not self._buffer + def feed_data(self, data): assert not self._eof, 'feed_data after feed_eof' |