summaryrefslogtreecommitdiffstats
path: root/Doc/library/enum.rst
Commit message (Collapse)AuthorAgeFilesLines
* [doc] Fix a few margins due to bad markup (GH-23619)Andre Delfino2020-12-171-1/+1
|
* bpo-42385: [Enum] add `_generate_next_value_` to StrEnum (GH-23735)Ethan Furman2020-12-101-2/+4
| | | The default for auto() is to return an integer, which doesn't work for `StrEnum`. The new `_generate_next_value_` for `StrEnum` returns the member name, lower cased.
* bpo-42517: [Enum] do not convert private names into members (GH-23722)Ethan Furman2020-12-101-0/+9
| | | private names, such as `_Color__hue` and `_Color__hue_` are now normal attributes, and do not become members nor raise exceptions
* bpo-41816: `StrEnum.__str__` is `str.__str__` (GH-22362)Ethan Furman2020-09-221-0/+15
| | | use `str.__str__` for `StrEnum` so that `str(StrEnum.member)` is the same as directly accessing the string value of the `StrEnum` member
* Enum: add extended AutoNumber example (GH-22349)Ethan Furman2020-09-221-0/+26
|
* bpo-41816: add `StrEnum` (GH-22337)Ethan Furman2020-09-221-0/+38
| | | | `StrEnum` ensures that its members were already strings, or intended to be strings.
* Enum: make `Flag` and `IntFlag` members iterable (GH-22221)Ethan Furman2020-09-161-0/+15
|
* bpo-40721: add note about enum member name case (GH-22231)Ethan Furman2020-09-141-0/+6
| | | * UPPER_CASE preferred as enum members are constants
* bpo-40204: Add :noindex: in the documentation (GH-21859)Victor Stinner2020-08-131-0/+1
| | | | | | | | | | Add :noindex: to duplicated documentation to fix "duplicate object description" errors. For example, fix this Sphinx 3 issue: Doc/library/configparser.rst:1146: WARNING: duplicate object description of configparser.ConfigParser.optionxform, other instance in library/configparser, use :noindex: for one of them
* Remove trailing >>> in enum docs (GH-21358)E-Paine2020-07-091-1/+0
| | | The >>> as the last line serve no purpose and are not colored correctly by Sphinx.
* bpo-40025: Require _generate_next_value_ to be defined before members (GH-19098)Ethan Onstott2020-04-281-0/+4
| | | require `_generate_next_value_` to be defined before members
* bpo-39234: `enum.auto()` default initial value as 1 (GH-17878)YoSTEALTH2020-01-061-1/+1
| | | | | | | | | | Updated as Eric mentioned "By default, the initial value starts at 1" https://bugs.python.org/issue39234 Automerge-Triggered-By: @ericvsmith
* bpo-39234: Doc: `enum.auto()` incrementation value not specified. (GH-17872)YoSTEALTH2020-01-061-1/+1
| | | * `enum.auto()` initial value is now specified as being `1`.
* Minor documentation fixes on library/enum (GH-15234)Antoine2019-08-201-5/+4
| | | * Minor documentation fixes on library/enum
* bpo-37479: on Enum subclasses with mixins, __format__ uses overridden ↵thatneat2019-07-041-3/+5
| | | | | __str__ (GH-14545) * bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__
* Fix typo: class declaration (GH-11678)nu_no2019-01-271-1/+1
|
* bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328)Ethan Furman2018-09-221-3/+10
| | | * bpo-29577: allow multiple mixin classes
* bpo-33437: add __new__ vs __init__ example (GH-9145)Ethan Furman2018-09-121-0/+31
| | | | | | Improve Enum docs. https://bugs.python.org/issue33437
* bpo-33217: Raise TypeError for non-Enum lookups in Enums (GH-6651)Rahul Jha2018-09-101-1/+1
| | | * bpo-33217: Raise TypeError for non-Enum lookups in Enums
* Fix moduleauthor/sectionauthor directives in Enum (GH-8117)Andrés Delfino2018-07-071-4/+4
|
* bpo-33866: enum: Stop using OrderedDict (GH-7698)INADA Naoki2018-06-181-2/+2
|
* bpo-31801: Enum: add _ignore_ as class option (#5237)Ethan Furman2018-01-221-1/+25
| | | | | | | | | | | | | | | | * bpo-31801: Enum: add _ignore_ as class option _ignore_ is a list, or white-space seperated str, of names that will not be candidates for members; these names, and _ignore_ itself, are removed from the final class. * bpo-31801: Enum: add documentation for _ignore_ * bpo-31801: Enum: remove trailing whitespace * bpo-31801: Enum: fix bulleted list format * bpo-31801: add version added for _ignore_
* Improve enum.Flag code example (GH-5167)Julian Kahnert2018-01-131-1/+1
| | | | The code example that demonstrate how to use enum.Flag was missing the import of enum.auto.
* correct documentation for enum.html (#358)Kartik Anand2017-02-281-2/+2
|
* Issue #29129: Fix typo in "Using auto" sectionBerker Peksag2017-01-021-1/+1
|
* close issue28172: Change all example enum member names to uppercase, per ↵Ethan Furman2016-11-211-172/+173
| | | | Guido; patch by Chris Angelico.
* issue23591: fix flag decomposition and reprEthan Furman2016-09-181-0/+22
|
* issue23591: add auto() for auto-generating Enum member valuesEthan Furman2016-09-111-16/+83
|
* improve Enum docsEthan Furman2016-09-081-11/+12
|
* add recipes for pseudo-valueless enumsEthan Furman2016-09-071-11/+68
|
* issue23591: more docs; slight change to reprEthan Furman2016-09-041-1/+12
|
* issue23591: bool(empty_flags) == False; more docs & testsEthan Furman2016-09-021-3/+59
|
* issue23591: add docs; code cleanup; more testsEthan Furman2016-09-021-46/+127
|
* issue26981: add _order_ compatibility shim to enum.EnumEthan Furman2016-08-201-1/+20
|
* Issue26988: remove AutoEnumEthan Furman2016-08-201-218/+65
|
* Silence warnings from 'make suspicious' to make the docs buildbot happyBerker Peksag2016-08-061-7/+9
|
* Add AutoEnum: automatically provides next value if missing. Issue 26988.Ethan Furman2016-08-051-65/+216
|
* Issue #24314: Merge doc links from 3.5Martin Panter2016-06-181-1/+1
|\
| * Issue #24314: Fix doc links for general attributes like __name__, __dict__Martin Panter2016-06-181-1/+1
| |
* | Issue #27125: Merge typo fixes from 3.5Martin Panter2016-05-301-2/+2
|\ \ | |/
| * Issue #27125: Remove duplicated words from documentation and commentsMartin Panter2016-05-301-2/+2
| |
* | Issue #25179: Documentation for formatted string literals aka f-stringsMartin Panter2016-02-131-1/+2
| | | | | | | | | | Some of the inspiration and wording is taken from the text of PEP 498 by Eric V. Smith, and the existing str.format() documentation.
* | Merge string formatting doc fixes from 3.5Martin Panter2016-02-081-6/+6
|\ \ | |/
| * Issue #25179: Preparatory cleanup of existing docs on string formattingMartin Panter2016-02-081-6/+6
| | | | | | | | | | | | | | | | | | * Various sections were pointing to the section on the string.Formatter class, when the section on the common format string syntax is probably more appropriate * Fix references to various format() functions and methods * Nested replacement fields may contain conversions and format specifiers, and this is tested; see Issue #19729 for instance
| * Close issue25594: advise against accessing Enum members from other membersEthan Furman2015-11-201-10/+16
| |
* | use public 'value'Ethan Furman2016-01-161-1/+1
| |
* | revert change 87a9dff5106c: pure Enum members again evaluate to True;Ethan Furman2016-01-151-1/+10
| | | | | | | | | | update Finer Points section of docs to cover boolean evaluation; add more tests for pure and mixed boolean evaluation
* | Close 25594: advise against accessing Enum members from other membersEthan Furman2015-11-201-10/+16
| |
* | Issue #25210: Change error message of do_richcompare()Victor Stinner2015-10-141-1/+1
|/ | | | | | | | | | | | Don't add parenthesis to type names. Add also quotes around the type names. Before: TypeError: unorderable types: int() < NoneType() After: TypeError: '<' not supported between instances of 'int' and 'NoneType'
* Issue #25161: Merge full stops from 3.4 into 3.5Martin Panter2015-10-101-1/+1
|\