From 79a486ec29ea59f5f1559973044d956bbce5262d Mon Sep 17 00:00:00 2001 From: Stefan Garlonta Date: Mon, 19 Jun 2023 20:02:38 +0200 Subject: [PATCH] Add docstrings --- pystreamapi/_streams/__base_stream.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pystreamapi/_streams/__base_stream.py b/pystreamapi/_streams/__base_stream.py index c26bb64..78a6595 100644 --- a/pystreamapi/_streams/__base_stream.py +++ b/pystreamapi/_streams/__base_stream.py @@ -110,6 +110,7 @@ def group_by(self, key_mapper: Callable[[K], Any]) -> 'BaseStream[K]': return self def __group_by(self, key_mapper: Callable[[Any], Any]): + """Groups the stream by the given key mapper. Uses the implementation of _group_to_dict.""" groups = self._group_to_dict(key_mapper) self._source = groups.items() @@ -154,6 +155,7 @@ def map_to_int(self) -> 'BaseStream[_V]': return self def __map_to_int(self): + """Converts the stream to integers.""" self._map(int) def map_to_str(self) -> 'BaseStream[_V]': @@ -165,6 +167,7 @@ def map_to_str(self) -> 'BaseStream[_V]': return self def __map_to_str(self): + """Converts the stream to strings.""" self._map(str) def peek(self, action: Callable) -> 'BaseStream[_V]':