Commit Graph

39 Commits

Author SHA1 Message Date
Adam Turner b0329c31b3
Several PEPs: Normalise `Post-History` (#2375) 2022-03-09 16:04:44 +00:00
Adam Turner 113e490701
Several PEPs: Use explicit `:pep:` and `:rfc:` roles (#2209) 2022-01-21 11:03:51 +00:00
Brett Cannon bb4751379a
Many PEPs: Normalize the 'Created' field (#1805) 2021-02-09 08:54:26 -08:00
Min ho Kim cfb7bd74db Fix typos (#1113) 2019-07-03 11:20:45 -07:00
Mariatta 3c0a1e18d3
Linkify the PEP numbers in "Superseded-By" header. (#726)
We're already linking PEP numbers in "Replaces:", and "Requires:".
Adjusted the code so it can link "Superseded-By:".
Add the "Replaces:" header where they're missing.
2018-07-10 11:04:15 -07:00
Mariatta cf3bad5ab3
Revert "Rename all .txt PEP files to .rst (GH-462)" (GH-464)
This reverts commit bb0e518ed3.
2017-11-11 11:28:55 -08:00
Huang Huang bb0e518ed3 Rename all .txt PEP files to .rst (GH-462)
For https://github.com/python/peps/issues/1
2017-11-11 10:30:43 -08:00
Benjamin Peterson 60d9b24542 promote m.p.o links to https 2017-06-11 12:02:39 -07:00
Ethan Furman 6ec9fdf432 Added rationale for functional API defaulting to 1 as the start. 2013-06-28 19:32:40 -07:00
Ethan Furman 04d5c1d67e Marked PEP-0435 as Final. 2013-06-14 22:31:01 -07:00
Brett Cannon 08741c3b40 Grammatical fixes 2013-05-11 18:28:29 -04:00
Eli Bendersky 2bd6510b87 Some clarifications about pickling of Enums 2013-05-11 10:19:02 -07:00
Eli Bendersky 3b6c636655 Updated PEP 435 with some in-line motivations, and some general cleanup.
Marked PEP 354 as superseded by PEP 435.
2013-05-10 05:45:20 -07:00
Barry Warsaw 29e05c9729 PEP 435 is accepted by Guido. 2013-05-09 19:59:04 -04:00
Barry Warsaw b10b0848b2 - The functional API gets a keyword-only `module` argument.
- Spell it 'mix-in'
- Clarify "behavior only"
2013-05-09 18:39:44 -04:00
Eli Bendersky 74f93fcf95 update todo items 2013-05-08 20:36:39 -07:00
Eli Bendersky 3ab1885dc7 Describe __members__ instead of __aliases__. +a few additional touch-ups 2013-05-08 20:32:27 -07:00
Barry Warsaw cc7de05c80 A few PEP 435 clarifications. 2013-05-06 16:15:38 -04:00
Eli Bendersky 939f5b14ff Fix typo 2013-05-04 17:45:15 -07:00
Eli Bendersky 286c812369 reword complicated sentence 2013-05-04 14:37:56 -07:00
Eli Bendersky 440ad4c854 Update PEP 435 with latest decisions and add some clarifications:
1. getitem syntax come-back
2. Define iteration in presence of aliases
3. __aliases__
4. s/Convenience/Functional/ API
5. Don't say enums created with the functional API can't be pickled, but
   provide the usual precaution from the doc of pickle
2013-05-04 06:28:32 -07:00
Eli Bendersky d223705ffc Overhaul PEP 435 to describe the current state of decisions, which deviates
from flufl.enum:

1. type(Color.red) == Color
2. All attrs of an enum that are not dunders and are not descriptors become
   enumeration values
3. Given class Color(Enum), it's only valid to subclass Color if Color
   defines no enumeration values
4. As a corollary to (3), class IntEnum(int, Enum) is also part of the
   stdlib (and serves as an example for others)

Other issues that were contended recently but seem to have gotten resolved:

A. __call__ for by-value access, explicit getattr() for by-name access.
   __getitem__ is removed from Enum
B. __int__ is removed from Enum. It's present by definition in IntEnum

NOTE: this is still an early draft that is in the process of being reviewed,
so please treat it accordingly.
2013-05-02 05:51:33 -07:00
Eli Bendersky 617d74e66e Remove unnecessary duplication 2013-04-13 05:44:51 -07:00
Eli Bendersky d3c26c354d Describe in detail access to enum values with [] and getattr 2013-04-12 19:54:37 -07:00
Barry Warsaw 455e1fcc45 The original motiviation is unnecessary to describe the API. 2013-04-12 15:01:05 -04:00
Barry Warsaw 8ea4fd96b4 Make it clear that iteration order is undefined for Enums but defined for
IntEnums.
2013-04-12 10:53:42 -04:00
Barry Warsaw 50fe21c75b Fix small typo. 2013-04-12 10:24:13 -04:00
Brett Cannon bca02a6e41 wording tweak 2013-04-12 09:22:43 -04:00
Eli Bendersky dd1600e927 Changes following discussion with Nick and Barry 2013-04-09 21:18:55 -07:00
Eli Bendersky abebe41b7b Better error messages on duplicate enum values 2013-04-09 20:32:13 -07:00
Eli Bendersky 5fb856ed65 Mention the convenience API in the creation section 2013-04-05 21:02:21 -07:00
Barry Warsaw 97ecde0859 wording 2013-04-05 14:25:16 -04:00
Barry Warsaw af9a392e94 ValueError instead of TypeError 2013-04-05 14:23:18 -04:00
Barry Warsaw ec85633fa4 A couple of corrections and additions. 2013-04-05 13:52:37 -04:00
Eli Bendersky cbd95cbb7b Trim trailing whitespace 2013-04-04 06:52:41 -07:00
Eli Bendersky 44b674e3a4 Updated PEP 435:
* split the main section to some subsections, to make it more readable
* described non-int values
* removed mentions of implicit int-ness of Enum, which is no longer
  supported (unless in IntEnum)
* described the new convenience API
* misc. cleanups
2013-04-04 06:52:14 -07:00
Eli Bendersky cb3c841bab Updates based on recent enhancements in flufl.enum + some clarifications.
More TODOs remain: importantly, the improved convenience/functional API.
2013-04-02 07:09:55 -07:00
Eli Bendersky d99232e4df Add a mention of IntEnum, summarizing the language summit and later discussions
on the subject.

Note that this is still in draft stage and decisions can change (and have
changed more than once over the past few days).
2013-03-15 07:25:45 -07:00
Barry Warsaw 72af6a15bc PEP 435, Adding an Enum type to the Python standard library, Bendersky/Warsaw 2013-02-25 10:15:03 -05:00