From 038fccc7ffab84535fd9998ac4b681198682a95f Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Thu, 26 Jan 2017 20:48:19 +0100 Subject: Untangle a list comprehension --- sounddevice.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sounddevice.py b/sounddevice.py index 50bbb81..885aad2 100644 --- a/sounddevice.py +++ b/sounddevice.py @@ -1897,10 +1897,8 @@ class DeviceList(tuple): __slots__ = () def __repr__(self): - idev, odev = [ - dev if isinstance(dev, int) else _get_device_id(dev, kind) - for kind, dev in zip(('input', 'output'), default.device) - ] + idev = _get_device_id(default.device['input'], 'input') + odev = _get_device_id(default.device['output'], 'output') digits = len(str(_lib.Pa_GetDeviceCount() - 1)) hostapi_names = [hostapi['name'] for hostapi in query_hostapis()] text = '\n'.join( -- cgit v1.2.3