Skip to content

Commit a36f152

Browse files
matusvalosprytnykPierre-Sassoulas
authored
Added singleton-comparison message example (#6158)
Co-authored-by: Vladyslav Krylasov <[email protected]> Co-authored-by: Pierre Sassoulas <[email protected]>
1 parent b82183b commit a36f152

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
game_won = True
2+
if game_won == True: # [singleton-comparison]
3+
print("Game won !")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
game_won = True
2+
if game_won:
3+
print("Game won !")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* `PEP 285 – Adding a bool type <https://peps.python.org/pep-0285/>`_

0 commit comments

Comments
 (0)