We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4ad432d + 4819bbc commit 0356177Copy full SHA for 0356177
ftplugin/orgmode/liborgmode/base.py
@@ -13,7 +13,12 @@
13
except:
14
from UserList import UserList
15
16
-import collections
+try:
17
+ from collections.abc import Iterable
18
+except ImportError:
19
+ # preserve compatibility with python < 3.10
20
+ from collections import Iterable
21
+
22
import sys
23
from orgmode.py3compat.unicode_compatibility import *
24
@@ -31,7 +36,7 @@ def flatten_list(lst):
31
36
def gen_lst(item):
32
37
if isinstance(item, basestring) or isinstance(item, bytes):
33
38
yield item
34
- elif isinstance(item, collections.Iterable):
39
+ elif isinstance(item, Iterable):
35
40
# yield from would be so nice... but c'est la vie
41
for val in item:
42
for final in gen_lst(val):
0 commit comments