Commit graph

225 commits

Author SHA1 Message Date
Raymond Hettinger
cf2532b39d
[3.12] Tee of tee was not producing n independent iterators (gh-123884) (gh-125153) 2024-10-08 20:16:18 +00:00
Serhiy Storchaka
39dea212f4
[3.12] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122013)
(cherry picked from commit 1a0c7b9ba4)
2024-07-19 09:08:33 +00:00
Miss Islington (bot)
60393f5f14
[3.12] Add unique() recipe to itertools docs (gh-119911) (gh-119917) 2024-06-01 12:06:18 -05:00
Raymond Hettinger
8fb48542d3
[3.12] Misc cleanups and wording improvements for the itertools docs (gh-119631) 2024-05-27 13:43:08 -05:00
Raymond Hettinger
2d700670ad
[3.12] Misc improvements to the docs for itertools (gh-119532) 2024-05-24 17:35:38 -05:00
Miss Islington (bot)
a370eebdd9
[3.12] Minor improvements to the docs for itertools.tee() (gh-119135) (gh-119137) 2024-05-18 01:51:20 -05:00
Miss Islington (bot)
bac277f1dd
[3.12] Misc improvements to the itertools docs (gh-119040) (#119044) 2024-05-14 15:27:03 +00:00
Miss Islington (bot)
71ec3533c6
[3.12] Itertools docs: fix parameter names and indentation in Python equivalents (gh-118977) (#119042) 2024-05-14 14:59:11 +00:00
Miss Islington (bot)
b83b3cb9da
[3.12] docs: module page titles should not start with a link to themselves (GH-117099) (#118791)
docs: module page titles should not start with a link to themselves (GH-117099)
(cherry picked from commit bcb435ee8f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-05-08 19:42:01 +00:00
Miss Islington (bot)
68316a04f3
[3.12] gh-118476: Fix corner cases in islice() rough equivalent. (Gh-118559) (#118587) 2024-05-05 06:49:19 +00:00
Miss Islington (bot)
7da5737bd8
[3.12] Minor improvements to the itertools recipes (GH-118563) (#118565) 2024-05-03 17:20:29 -05:00
Hugo van Kemenade
eb0bfb5910
[3.12] Docs: add link roles with Sphinx extlinks (GH-117850) (#117910)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-15 13:18:21 -06:00
Miss Islington (bot)
37514111be
[3.12] gh-116842: Improve test comment and fix a doctest (gh-116846) (gh-116847) 2024-03-15 02:46:54 +00:00
Raymond Hettinger
e4ec445926
[3.12] Minor improvements to the itertools documentation (gh-116833) (gh-116838) 2024-03-14 19:41:38 -05:00
Miss Islington (bot)
592c0e26c0
[3.12] Better presentation order for recipes. (gh-116755) (gh-116757) 2024-03-13 20:12:09 +00:00
Miss Islington (bot)
e5c1456bbd
[3.12] Modernize roundrobin() recipe and improve variable names (gh-116710) (gh-116711) 2024-03-13 07:19:12 +00:00
Miss Islington (bot)
9f38686f62
[3.12] Minor clarity improvement for the iter_index() recipe. Also add value subsequence tests. (gh-116696) (gh-116698) 2024-03-13 02:40:31 +00:00
Miss Islington (bot)
817ccac17c
[3.12] Beef-up tests for the itertool docs. (gh-116679) (gh-116688) 2024-03-12 22:26:32 +00:00
Miss Islington (bot)
0a9356ce6d
[3.12] Consistently spell out *predicate* instead of *pred*. (gh-116308) (gh-116312) 2024-03-04 16:18:52 +00:00
Miss Islington (bot)
010aac7c1a
[3.12] Make the iter_except() recipe more compact. (gh-116132) (gh0116133) 2024-02-29 17:37:00 +00:00
Miss Islington (bot)
d4a1c8e628
[3.12] Update an out-of-date example in the itertools recipe intro (gh-116082) (gh-116084) 2024-02-28 17:19:17 -06:00
Miss Islington (bot)
a85e512699
[3.12] Improve all_equal() recipe (gh-116081) (gh-116083) 2024-02-28 17:11:46 -06:00
Miss Islington (bot)
124594913d
[3.12] gh-113479: Link to workaround for subtle issue with takewhile() (gh-115890) (gh-115910) 2024-02-25 12:38:15 +00:00
Miss Islington (bot)
0b31a50ecd
[3.12] Minor algebraic simplification for the totient() recipe (gh-113822) (gh-113823) 2024-01-08 19:22:42 +00:00
Miss Islington (bot)
8a95500367
[3.12] Misc minor improvements to the itertools recipes (gh-113477) (gh-113478) 2023-12-25 22:32:05 +00:00
Miss Islington (bot)
d77d62ab79
[3.12] Add reshape() recipe to demonstrate a use case for batched() and chained.from_iterable() (gh-113198) (gh-113201) 2023-12-16 00:09:49 +00:00
Miss Islington (bot)
b9c5ffe6e7
[3.12] Use match/case in grouper() recipe (gh-113059) (gh-113197) 2023-12-15 22:39:11 +00:00
Miss Islington (bot)
85ee49c434
[3.12] Minor stylistic edit to the grouper recipe (gh-112759) (gh-113196) 2023-12-15 16:32:32 -06:00
Miss Islington (bot)
614691a7e7
[3.12] Optimize unique_justseen() recipe for a common case. (gh-113147) (gh-113150) 2023-12-14 23:34:00 +00:00
Miss Islington (bot)
b4eeb97f1b
[3.12] Remove itertool recipe with low pedagogical value (gh-113138) (gh-113140) 2023-12-14 20:42:36 +00:00
Miss Islington (bot)
6b295722aa
[3.12] Add recipe for totient() to demonstrate unique_justseen() and factor(). (gh-113131) (gh-113134) 2023-12-14 19:24:15 +00:00
Miss Islington (bot)
bfc6d91c78
[3.12] Fix docstring and var name of itertools recipe (GH-112113) (#112310)
Fix docstring and var name of itertools recipe (GH-112113)

`prepend()` works with arbitrary iterables, not only iterators. In fact,
the example given uses a `list`, which is iterable, but not an iterator.
(cherry picked from commit 6c47eaccfa)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2023-11-22 05:41:53 +00:00
Miss Islington (bot)
883233dcc3
[3.12] gh-111343: Fix itertools docs: start arg is optional for count (gh-111344) (gh-111385) 2023-10-27 10:01:00 -05:00
Raymond Hettinger
221c8d64e6
[3.12] Sync factor() recipe with main branch (gh-110231) 2023-10-02 14:19:46 -05:00
Miss Islington (bot)
0015a9aad5
[3.12] Misc itertool recipe improvements, mostly docstrings and comments (gh-109555) (#109572)
(cherry picked from commit f2636d2c45)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-09-22 14:43:40 +02:00
Miss Islington (bot)
778d094126
[3.12] Fix iter_index() to work with lists which do not support stop=None. (gh-109306) (#109310)
Fix iter_index() to work with lists which do not support stop=None. (gh-109306)
(cherry picked from commit f2a55fecd0)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-09-12 16:23:20 +02:00
Miss Islington (bot)
aef019b04a
[3.12] Improve the sieve() recipe in the itertools docs (gh-109199) (#109203)
Improve the sieve() recipe in the itertools docs (gh-109199)

Lazier sieve
(cherry picked from commit d3ed9921cd)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-09-12 16:00:33 +02:00
Miss Islington (bot)
183bb673a8
[3.12] gh-107208: Fix iter_index() recipe to not swallow exceptions (gh-108835) (#108837)
gh-107208: Fix iter_index() recipe to not swallow exceptions (gh-108835)
(cherry picked from commit f373c6b948)


gh-107208: iter_index now supports "stop" and no longer swallows ValueError

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-09-04 13:46:35 +02:00
Miss Islington (bot)
9c00dc02cf
[3.12] Add more recipe tests. Make the factor recipe a bit faster and clearer. (GH-106817) (GH-106818) 2023-07-16 21:47:58 -05:00
Miss Islington (bot)
18d98bacb6
[3.12] Add more examples to the recipe docs (GH-106782) (GH-106783) 2023-07-15 15:09:20 -05:00
Miss Islington (bot)
67127ca8e2
[3.12] Small speed-up for the convolve() recipe. (GH-106371) (GH-106375) 2023-07-03 15:49:09 -05:00
Miss Islington (bot)
6fe0a6ba73
[3.12] sliding_window() recipe: Raise ValueError for non-positive window sizes. Add more tests. (GH-105403) (GH-105405) 2023-06-06 14:00:17 -05:00
Miss Islington (bot)
1a47d11f35
[3.12] Misc improvements to the itertools docs (GH-104916) (GH-104917) 2023-05-24 22:39:41 -05:00
Raymond Hettinger
c3453fbb11
Update itertool recipe: polynomial_from_roots() (GH-103973) 2023-04-28 12:25:50 -05:00
Raymond Hettinger
f65fdbb8fd
Itertool recipe improvements (GH-103399) 2023-04-09 14:17:37 -05:00
Raymond Hettinger
16f6165b71
Minor readability improvement to the factor() recipe (GH-102971) 2023-03-23 14:46:15 -05:00
Raymond Hettinger
0214c7ad90
Tweak polynomial itertool recipes (GH-102880) 2023-03-21 13:21:57 -05:00
wim glenn
4bb1dd3c5c
gh-102876: remove superfluous parens from itertools.batched recipe (GH-102877)
remove superfluous parens from itertools.batched recipe
2023-03-21 12:06:18 -05:00
Raymond Hettinger
1a5a14183e
The pow() variant further improves accuracy (GH-102866) 2023-03-21 00:02:14 -05:00
Raymond Hettinger
4075fe1d8d
Remove itermediate list. Expand docstring. (GH-102862) 2023-03-20 20:40:04 -05:00