Skip to content

Conversation

@pochmann
Copy link
Contributor

No need to build scalars and scalar_positions. Just put the scalars into new_item directly. (And a little optimization in the main loop, removing a detour through an extra variable).

@kalekundert

Issue reference

more-itertools/more-itertools#XXXX

Changes

No need to build `scalars` and `scalar_positions`. Just put the scalars into `new_item` directly. (And a little optimization in the main loop, removing a detour through an extra variable).

@kalekundert
@pochmann
Copy link
Contributor Author

The failed check is from linting a file I didn't change...

@pochmann pochmann changed the title Simplify zip_broadcast Simplify zip_broadcast Jul 30, 2023
@bbayles
Copy link
Collaborator

bbayles commented Jul 31, 2023

Please merge in the master branch for the flake8 issue.

@bbayles bbayles merged commit 3e1b301 into more-itertools:master Jul 31, 2023
@pochmann pochmann deleted the patch-5 branch July 31, 2023 15:32
lengau referenced this pull request in canonical/charmcraft Sep 12, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [more-itertools](https://togithub.com/more-itertools/more-itertools) |
`==10.0.0` -> `==10.1.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/more-itertools/10.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/more-itertools/10.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/more-itertools/10.0.0/10.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/more-itertools/10.0.0/10.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>more-itertools/more-itertools (more-itertools)</summary>

###
[`v10.1.0`](https://togithub.com/more-itertools/more-itertools/releases/tag/v10.1.0):
Version 10.1.0

[Compare
Source](https://togithub.com/more-itertools/more-itertools/compare/v10.0.0...v10.1.0)

##### What's Changed

- Add more tests for `zip_broadcast()` by
[@&#8203;kalekundert](https://togithub.com/kalekundert) in
[https://github.com/more-itertools/more-itertools/pull/739](https://togithub.com/more-itertools/more-itertools/pull/739)
- Added takewhile_inclusive by
[@&#8203;OlegAlexander](https://togithub.com/OlegAlexander) in
[https://github.com/more-itertools/more-itertools/pull/736](https://togithub.com/more-itertools/more-itertools/pull/736)
- Speed up `zip_broadcast()` by pre-filling the scalar elements by
[@&#8203;kalekundert](https://togithub.com/kalekundert) in
[https://github.com/more-itertools/more-itertools/pull/740](https://togithub.com/more-itertools/more-itertools/pull/740)
- Added outer_product. by
[@&#8203;OlegAlexander](https://togithub.com/OlegAlexander) in
[https://github.com/more-itertools/more-itertools/pull/743](https://togithub.com/more-itertools/more-itertools/pull/743)
- Simplify `zip_broadcast` by
[@&#8203;pochmann](https://togithub.com/pochmann) in
[https://github.com/more-itertools/more-itertools/pull/742](https://togithub.com/more-itertools/more-itertools/pull/742)
- Simplify `_zip_equal` by
[@&#8203;pochmann](https://togithub.com/pochmann) in
[https://github.com/more-itertools/more-itertools/pull/744](https://togithub.com/more-itertools/more-itertools/pull/744)
- fix consume() type annotation by
[@&#8203;obaltian](https://togithub.com/obaltian) in
[https://github.com/more-itertools/more-itertools/pull/746](https://togithub.com/more-itertools/more-itertools/pull/746)
- Version 10.1.0 by [@&#8203;bbayles](https://togithub.com/bbayles) in
[https://github.com/more-itertools/more-itertools/pull/747](https://togithub.com/more-itertools/more-itertools/pull/747)

##### New Contributors

- [@&#8203;OlegAlexander](https://togithub.com/OlegAlexander) made their
first contribution in
[https://github.com/more-itertools/more-itertools/pull/736](https://togithub.com/more-itertools/more-itertools/pull/736)
- [@&#8203;obaltian](https://togithub.com/obaltian) made their first
contribution in
[https://github.com/more-itertools/more-itertools/pull/746](https://togithub.com/more-itertools/more-itertools/pull/746)

**Full Changelog**:
more-itertools/more-itertools@v10.0.1...v10.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" in timezone Etc/UTC,
Automerge - "before 07:00" in timezone Etc/UTC.

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/canonical/charmcraft).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44My4wIiwidXBkYXRlZEluVmVyIjoiMzYuODMuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants