Skip to content

Commit

Permalink
Added singleton-comparison message example (#6158)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladyslav Krylasov <vladyslav.krylasov@gmail.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
  • Loading branch information
3 people committed Apr 3, 2022
1 parent b82183b commit a36f152
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/data/messages/s/singleton-comparison/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
game_won = True
if game_won == True: # [singleton-comparison]
print("Game won !")
3 changes: 3 additions & 0 deletions doc/data/messages/s/singleton-comparison/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
game_won = True
if game_won:
print("Game won !")
1 change: 1 addition & 0 deletions doc/data/messages/s/singleton-comparison/related.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `PEP 285 – Adding a bool type <https://peps.python.org/pep-0285/>`_

0 comments on commit a36f152

Please sign in to comment.