Skip to content

Commit 0a36534

Browse files
committed
html can now return none
1 parent 5ed1300 commit 0a36534

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/examples/python/tutorial_tic_tac_toe/tic_tac_toe.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@
77
def square(value, on_square_click):
88
return html.button(
99
{"className": "square", "on_click": on_square_click},
10-
value or "",
10+
value,
1111
)
1212

1313

1414
@component
1515
def board(x_is_next, squares, on_play):
16-
1716
def handle_click(i):
1817
def handle_click_event(_event):
19-
"""Due to a quirk of Python, if your event handler needs args other than
18+
"""
19+
Due to a quirk of Python, if your event handler needs args other than
2020
`event`, you will need to create a wrapper function as seen above.
21-
Ref: https://pylint.readthedocs.io/en/stable/user_guide/messages/warning/cell-var-from-loop.html"""
21+
Ref: https://pylint.readthedocs.io/en/stable/user_guide/messages/warning/cell-var-from-loop.html
22+
"""
2223
if calculate_winner(squares) or squares[i]:
2324
return
2425

0 commit comments

Comments
 (0)