Re: Rock Paper Scissors Code Bug?
Roel Schroeven <[email protected]> Mon, 8 Dec 2025 21:44:07 +0100
| Newsgroups | gmane.comp.python.general |
|---|---|
| Message-ID | <[email protected]> |
Op 8/12/2025 om 20:43 schreef Jason Friedman via Python-list:
> One practice I follow is declaring strings, _especially_ those used more
> than once, at the top:
In a case like this, an Enum could probably be even more fitting (or in
this case more specifically a StrEnum). See
https://docs.python.org/3.13/library/enum.html#enum.StrEnum
--
"The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom."
-- Isaac Asimov