summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/flatten.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ranger/ext/flatten.py b/ranger/ext/flatten.py
index 19342efe..55d3e82f 100644
--- a/ranger/ext/flatten.py
+++ b/ranger/ext/flatten.py
@@ -12,15 +12,17 @@
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
+from collections import deque
+
 def flatten(lst):
 	"""
 	Flatten an iterable.
 
-	All contained tuples, lists and sets are replaced by their
+	All contained tuples, lists, deques and sets are replaced by their
 	elements and flattened as well.
 	"""
 	for elem in lst:
-		if isinstance(elem, (tuple, list, set)):
+		if isinstance(elem, (tuple, list, set, deque)):
 			for subelem in flatten(elem):
 				yield subelem
 		else: