-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Update detect.py #1198
Conversation
This generator causes an error in detect_windows because it is run twice there. Better store it as a data structure instead.
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 ( |
@longjon If I had a reason I've forgotten it. The list comprehension seems perfectly right here. |
Replaced generator with a list comprehension
Replaced the generator with a list comprehension, works fine now. Thanks! |
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! |
This generator causes an error in detect_windows because it is run twice there. Better store it as a data structure instead.