]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
docs: add a more precise example in enum doc (GH-121015)
authorFilip "Ret2Me" Poplewski <37419029+Ret2Me@users.noreply.github.com>
Fri, 1 Nov 2024 19:28:50 +0000 (20:28 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Nov 2024 19:28:50 +0000 (12:28 -0700)
commitff257c7843d8ed0dffb6624f2f14996a46e74801
tree53b96855d5bbf1359fc93bcd36e4c94f18a66248
parent37651cfbce514a8daed75a8c63d6889081a63a23
docs: add a more precise example in enum doc (GH-121015)

* docs: add a more precise example

Previous example used manual integer value assignment in class based declaration but in functional syntax has been used auto value assignment what could be confusing for the new users. Additionally documentation doesn't show how to declare new enum via functional syntax with usage of the manual value assignment.

* docs: remove whitespace characters

* refactor: change example

---------

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Doc/library/enum.rst