Skip to content

Commit f6558ae

Browse files
committed
add dict get() method
remove try and except
1 parent 6d8fc4c commit f6558ae

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

plotly/tools.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,7 @@ def make_subplots(rows=1, cols=1,
765765
vertical_spacing = 0.3 / rows
766766

767767
# Set 'subplot_titles'
768-
try:
769-
subplot_titles = kwargs['subplot_titles']
770-
except KeyError:
771-
subplot_titles = []
768+
subplot_titles = kwargs.get('subplot_titles', [""] * rows * cols)
772769

773770
# Sanitize 'specs' (must be a list of lists)
774771
exception_msg = "Keyword argument 'specs' must be a list of lists"

0 commit comments

Comments
 (0)