]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] docs: add a more precise example in enum doc (GH-121015) (#126306)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 1 Nov 2024 23:17:35 +0000 (00:17 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Nov 2024 23:17:35 +0000 (16:17 -0700)
commitbdda85ec87f99da9ae12589d90d8a13014fd22ba
tree29f1a942267e222ab19f501fbc21bdad1bf774d0
parentf8a9a1ced1f0a6168604695ce1589a90365a719f
[3.13] docs: add a more precise example in enum doc (GH-121015) (#126306)

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

---------

(cherry picked from commit ff257c7843d8ed0dffb6624f2f14996a46e74801)

Co-authored-by: Filip "Ret2Me" Poplewski <37419029+Ret2Me@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Doc/library/enum.rst