Skip to content

Commit ad18e49

Browse files
committed
Used the range argument of itertools.product.
1 parent ce0bde3 commit ad18e49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/examples_ScrollableFrameTk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def grid_of_widgets():
1818
# Add widgets to the `frame` attribute of the scrollable frame, not to the
1919
# scrollable frame itself.
2020
dim = 10
21-
for (i, j) in itertools.product(range(dim), range(dim)):
21+
for (i, j) in itertools.product(range(dim), repeat=2):
2222
tk.Label(scrollable_frame.frame, text=f'Label\n({i}, {j})').grid(row=i, column=j, padx=10, pady=10)
2323

2424
scrollable_frame.pack(expand=True, fill=tk.BOTH)

examples/examples_ScrollablePanelWx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def grid_of_widgets():
1818
# scrollable panel itself.
1919
dim = 10
2020
grid_sizer = wx.GridSizer(dim, dim, 20, 20)
21-
for (i, j) in itertools.product(range(dim), range(dim)):
21+
for (i, j) in itertools.product(range(dim), repeat=2):
2222
grid_sizer.Add(wx.StaticText(scrollable_panel.panel, label=f'Label\n({i}, {j})'))
2323

2424
scrollable_panel.panel.SetSizer(grid_sizer)

0 commit comments

Comments
 (0)