You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def get_backends():
possible_backends = []
if sys.platform == "win32" and int(platform.win32_ver()[0].split(".")[0]) >= 8:
possible_backends.append("_camera (MSMF)")
if "linux" in sys.platform:
possible_backends.append("_camera (V4L2)")
if "darwin" in sys.platform:
possible_backends.append("OpenCV-Mac")
possible_backends.append("OpenCV")
Sorry if this is a nitpick issue, but since CPython 3.8>= is used, couldn't this line:
if sys.platform == "linux":
possible_backends.append("_camera (V4L2)")
be used instead? According to the docs, there isn't really a need to use the 'in' operator since no major version will show up when accessing sys.platform (the string will just be 'linux')? Just a thought!
"Changed in version 3.3: On Linux, sys.platform doesn’t contain the major version anymore. It is always 'linux', instead of 'linux2' or 'linux3'."
The text was updated successfully, but these errors were encountered:
src_py/camera.py
Sorry if this is a nitpick issue, but since CPython 3.8>= is used, couldn't this line:
be used instead? According to the docs, there isn't really a need to use the 'in' operator since no major version will show up when accessing sys.platform (the string will just be 'linux')? Just a thought!
"Changed in version 3.3: On Linux, sys.platform doesn’t contain the major version anymore. It is always 'linux', instead of 'linux2' or 'linux3'."
The text was updated successfully, but these errors were encountered: