Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b0e311 commit 9f2b532Copy full SHA for 9f2b532
lib/matplotlib/figure.py
@@ -785,14 +785,14 @@ def fixitems(items):
785
# to tuples for the key
786
ret = []
787
for k, v in items:
788
- if iterable(v):
789
- # some objects can define __getitem__ without being
790
- # iterable and in those cases the conversion to tuples
791
- # will fail.
792
- try:
793
- v = tuple(v)
794
- except:
795
- pass
+ # some objects can define __getitem__ without being
+ # iterable and in those cases the conversion to tuples
+ # will fail. So instead of using the iterable(v) function
+ # we simply try and convert to a tuple, and proceed if not.
+ try:
+ v = tuple(v)
+ except Exception:
+ pass
796
ret.append((k, v))
797
return tuple(ret)
798
0 commit comments