From 3e8358a1c445ac52a6ab4f1498af5c9efefe7d5d Mon Sep 17 00:00:00 2001 From: AmirHossein Ahmadi Date: Sat, 29 Mar 2025 16:59:41 +0330 Subject: [PATCH 1/3] upgrade uv --- uv.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uv.lock b/uv.lock index 2ca4db3..f6790f5 100644 --- a/uv.lock +++ b/uv.lock @@ -77,7 +77,7 @@ wheels = [ [[package]] name = "pyenumerable" -version = "1.0.2" +version = "1.1.0" source = { virtual = "." } [package.dev-dependencies] From 15d1f3dafe5779aa94d95221842d762c9e3e6a9a Mon Sep 17 00:00:00 2001 From: AmirHossein Ahmadi Date: Sat, 29 Mar 2025 16:59:51 +0330 Subject: [PATCH 2/3] update version --- pyenumerable/__init__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyenumerable/__init__.py b/pyenumerable/__init__.py index bd2f8c7..0c78ff0 100644 --- a/pyenumerable/__init__.py +++ b/pyenumerable/__init__.py @@ -9,6 +9,6 @@ __all__ = ["Enumerable", "PurePythonEnumerable", "pp_enumerable"] __author__ = "AmirHossein Ahmadi" __license__ = "WTFPL" -__version__ = "1.0.2" +__version__ = "1.1.0" __maintainer__ = "AmirHossein Ahmadi" __email__ = "amirthehossein@gmail.com" diff --git a/pyproject.toml b/pyproject.toml index 1e43899..e9d8ca6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pyenumerable" -version = "1.0.2" +version = "1.1.0" description = "Implementation of .net's IEnumerable interface in python W/ support for generics." readme = "readme.md" authors = [ From 5edee69b67008b0a9f73a8591de98f6c5a8b6e8f Mon Sep 17 00:00:00 2001 From: AmirHossein Ahmadi Date: Sat, 29 Mar 2025 16:59:58 +0330 Subject: [PATCH 3/3] add docs to use pp --- documentation.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/documentation.md b/documentation.md index 922d81a..1d7d150 100644 --- a/documentation.md +++ b/documentation.md @@ -19,7 +19,7 @@ Type of items of `self`. ##### `comparer` -A callable which accepts two arguments of type `Tsource` & returns a `bool` value; The meaning of the returned value is dependant on the context of its method; usually defaults to `lambda i, o: i == o`. +A callable which accepts two arguments of type `TSource` & returns a `bool` value; The meaning of the returned value is dependant on the context of its method; usually defaults to `lambda i, o: i == o`. #### `Enumerable` @@ -702,3 +702,19 @@ assert one.zip(two).source == ((1, "five"), (2, "four"), (3, "three")) type parameters: - `TSecond`: Type of items of the second enumerable. + +### Implementations + +#### `PurePythonEnumerable` + +A basic implementation of Enumerable; Written without the assumption of `TSource` conforming to `collections.abc.Hashable` or being immutable; preserves order. + +usage: +```py +from pyenumerable import pp_enumerable +my_enumerable = pp_enumerable(*items, from_iterable=from_iterable) +``` + +arguments: +- `items`: Directly used items +- `from_iterable`: An iterable of iterables which hold items