Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace loop appends with list comprehension. #5528

Merged
merged 2 commits into from
May 31, 2023

Conversation

ttsugriy
Copy link
Contributor

Replace loop appends with list comprehension.

It's significantly faster because it avoids repeated method lookup. It's also more idiomatic and readable.

It's significantly faster because it avoids repeated method lookup. It's also more idiomatic and readable.
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@hwchase17 hwchase17 added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label May 31, 2023
@ttsugriy
Copy link
Contributor Author

thank you for creating this awesome project! It's an honor to contribute in any way, @hwchase17!

@dev2049 dev2049 merged commit 0ad76c3 into langchain-ai:master May 31, 2023
@ttsugriy ttsugriy deleted the patch-3 branch May 31, 2023 23:57
@danielchalef danielchalef mentioned this pull request Jun 5, 2023
Undertone0809 pushed a commit to Undertone0809/langchain that referenced this pull request Jun 19, 2023
# Replace loop appends with list comprehension.

It's significantly faster because it avoids repeated method lookup. It's
also more idiomatic and readable.
This was referenced Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants