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

refactoring code with List Comprehension #15924

Merged
merged 2 commits into from
Jan 21, 2022

Conversation

idiomaticrefactoring
Copy link
Contributor

refactoring code with List Comprehension which is more pythonic, concise and efficient; how do you think this change which has practical value?

refactoring code with List Comprehension which is more pythonic, concise and efficient
@gbaned gbaned requested a review from rchao January 20, 2022 15:37
@google-ml-butler google-ml-butler bot added the keras-team-review-pending Pending review by a Keras team member. label Jan 20, 2022
@qlzh727 qlzh727 removed the keras-team-review-pending Pending review by a Keras team member. label Jan 20, 2022
@@ -1790,11 +1790,9 @@ def data_generator():

values = []
with open(fp) as f:
for x in csv.reader(f):
# In windows, due to \r\n line ends we may end up reading empty lines
values = [x for x in csv.reader(f) if x]# In windows, due to \r\n line ends we may end up reading empty lines
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR! The change looks reasonable. Can you re-format the comment?

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Jan 20, 2022
@copybara-service copybara-service bot merged commit 36d5e2f into keras-team:master Jan 21, 2022
@google-ml-butler google-ml-butler bot removed the ready to pull Ready to be merged into the codebase label Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants