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

Update detect.py #1198

Closed
wants to merge 2 commits into from
Closed

Update detect.py #1198

wants to merge 2 commits into from

Conversation

dbbert
Copy link
Contributor

@dbbert dbbert commented Oct 1, 2014

This generator causes an error in detect_windows because it is run twice there. Better store it as a data structure instead.

This generator causes an error in detect_windows because it is run twice there. Better store it as a data structure instead.
@longjon
Copy link
Contributor

longjon commented Oct 1, 2014

Makes sense. @shelhamer is there a reason this was a generator in the first place?

@dbbert, if we're going to use a list instead, just write a list comprehension ([blah for blah in blah]) rather than creating a generator and then converting it to a list.

@shelhamer
Copy link
Member

@longjon If I had a reason I've forgotten it. The list comprehension seems perfectly right here.

Replaced generator with a list comprehension
@dbbert
Copy link
Contributor Author

dbbert commented Oct 2, 2014

Replaced the generator with a list comprehension, works fine now. Thanks!

longjon added a commit that referenced this pull request Oct 2, 2014
longjon added a commit that referenced this pull request Oct 2, 2014
@longjon
Copy link
Contributor

longjon commented Oct 2, 2014

Looks good, but please obey PEP8/Google Python style by not exceeding 80 characters per line. I went ahead and squashed these commits, amended to follow the original formatting, and merged into master and dev as 4e0868d.

Thanks for the fix!

@longjon longjon closed this Oct 2, 2014
shelhamer added a commit that referenced this pull request Oct 8, 2014
mitmul pushed a commit to mitmul/caffe that referenced this pull request Oct 11, 2014
mitmul pushed a commit to mitmul/caffe that referenced this pull request Oct 11, 2014
RazvanRanca pushed a commit to RazvanRanca/caffe that referenced this pull request Nov 4, 2014
RazvanRanca pushed a commit to RazvanRanca/caffe that referenced this pull request Nov 4, 2014
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.

3 participants