Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
PEP 326 -- A Case for Top and Bottom Values PEP:326 Title:A Case for Top and Bottom Values Author:Josiah Carlson <jcarlson at uci.edu>, Terry Reedy <tjreedy at udel.edu> Status:Rejected Type:Standards Track Created:20-Dec-2003 Python-Version:2.4 Post-History:20-Dec-2003, 03-Jan-2004, 05-Jan-2004, 07-Jan-2004, 21-Feb-2004 Contents Results Abstract Rationale Motivation Max Examples A Min Example Other Examples Independent Implementations? Reference Implementation O...
PEP 651 -- Robust Stack Overflow Handling PEP:651 Title:Robust Stack Overflow Handling Author:Mark Shannon <mark at hotpy.org> Status:Rejected Type:Standards Track Created:18-Jan-2021 Post-History:19-Jan-2021 Contents Rejection Notice Abstract Motivation Rationale Specification StackOverflow exception RecursionOverflow exception Decoupling the Python stack from the C stack Other Implementations C-API Py_CheckStackDepth() Py_EnterRecursiveCall() PyLeaveRecursiveCall() ...
...reversed, it should be possible to yield without passing an explicit value (yield is of course equivalent to yield None). When send(value) is called, the yield-expression that it resumes will return the passed-in value. When next() is called, the resumed yield-expression will return None. If the yield-expression is a yield-statement, this returned value is ignored, similar to ignoring the value returned by a function call used as a statement. In effect, a yield-expression is like an inverted f...
PEP 331 -- Locale-Independent Float/String Conversions PEP:331 Title:Locale-Independent Float/String Conversions Author:Christian R. Reis <kiko at async.com.br> Status:Final Type:Standards Track Created:19-Jul-2003 Python-Version:2.4 Post-History:21-Jul-2003, 13-Aug-2003, 18-Jun-2004 Contents Abstract Introduction Rationale Example Problem Proposal Potential Code Contributions Risks Implementation References Copyright Abstract Support for the LC_NUMERIC locale categor...
What's new in Python 2.3 What's new in Python 2.3 Here are the (subjective) highlights of what's new in Python 2.3. Faster According to a couple of simple benchmark, Python 2.3 is about 20-30% faster than Python 2.2.3. Some of this speed-up was obtained by removing the SET_LINENO opcodes, which means that the difference is less impressive when comparing "python -O"; the rest was various careful tune-ups. New Tools A brand new version of IDLE (from the IDLEfork project at So...
PEP 400 -- Deprecate codecs.StreamReader and codecs.StreamWriter PEP:400 Title:Deprecate codecs.StreamReader and codecs.StreamWriter Author:Victor Stinner <vstinner at python.org> Status:Deferred Type:Standards Track Created:28-May-2011 Python-Version:3.3 Contents Abstract PEP Deferral Motivation Rationale StreamReader and StreamWriter issues TextIOWrapper features TextIOWrapper issues Possible improvements of StreamReader and StreamWriter Usage of StreamReader and Stream...
PEP 320 -- Python 2.4 Release Schedule PEP:320 Title:Python 2.4 Release Schedule Author:Barry Warsaw, Raymond Hettinger, Anthony Baxter Status:Final Type:Informational Created:29-Jul-2003 Python-Version:2.4 Post-History:01-Dec-2004 Contents Abstract Release Manager Release Schedule Completed features for 2.4 Deferred until 2.5 Ongoing tasks Open issues Carryover features from Python 2.3 References Copyright Abstract This document describes the development and release schedu...
PEP 252 -- Making Types Look More Like Classes PEP:252 Title:Making Types Look More Like Classes Author:guido at python.org (Guido van Rossum) Status:Final Type:Standards Track Created:19-Apr-2001 Python-Version:2.2 Post-History: Contents Abstract Introduction Introspection APIs Specification of the class-based introspection API Specification of the attribute descriptor API Static methods and class methods C API Discussion Examples Backwards compatibility Warnings and Errors I...
PEP 680 -- tomllib: Support for Parsing TOML in the Standard Library PEP:680 Title:tomllib: Support for Parsing TOML in the Standard Library Author:Taneli Hukkinen, Shantanu Jain <hauntsaninja at gmail.com> Sponsor:Petr Viktorin <encukou at gmail.com> Discussions-To:https://discuss.python.org/t/13040 Status:Accepted Type:Standards Track Created:01-Jan-2022 Python-Version:3.11 Post-History:11-Jan-2022 Resolution:https://mail.python.org/archives/list/python-dev@python.o...
PEP 3137 -- Immutable Bytes and Mutable Buffer PEP:3137 Title:Immutable Bytes and Mutable Buffer Author:Guido van Rossum <guido at python.org> Status:Final Type:Standards Track Created:26-Sep-2007 Python-Version:3.0 Post-History:26-Sep-2007, 30-Sep-2007 Contents Introduction Advantages Naming Summary Literal Notations Functionality PEP 3118 Buffer API Constructors Comparisons Slicing Indexing Str() and Repr() Operators Methods Bytes and the Str Type The basestring Type...
PEP 335 -- Overloadable Boolean Operators PEP:335 Title:Overloadable Boolean Operators Author:Gregory Ewing <greg.ewing at canterbury.ac.nz> Status:Rejected Type:Standards Track Created:29-Aug-2004 Python-Version:3.3 Post-History:05-Sep-2004, 30-Sep-2011, 25-Oct-2011 Contents Rejection Notice Abstract Background Motivation Rationale Specification Special Methods Bytecodes Type Slots Python/C API Functions Alternatives and Optimisations Reduced special method set Additi...
Unifying types and classes in Python 2.2 Unifying types and classes in Python 2.2 Python Version: 2.2 (For a newer version of this tutorial, see Python 2.2.3) Guido van Rossum This paper is an incomplete draft. I am soliciting feedback. If you find any problems, please write me at guido@python.org. Table of Contents Introduction Subclassing built-in types Built-in types as factory functions Introspecting instances of built-in types Static methods and class met...
Unifying types and classes in Python 2.2 Unifying types and classes in Python 2.2 Python Version: 2.2.1 (For a newer version of this tutorial, see Python 2.2.3) Guido van Rossum This paper is an incomplete draft. I am soliciting feedback. If you find any problems, please write me at guido@python.org. Table of Contents Change Log Introduction Subclassing built-in types Built-in types as factory functions Introspecting instances of built-in types Static metho...
Unifying types and classes in Python 2.2 Unifying types and classes in Python 2.2 Python Version: 2.2.2 (For a newer version of this tutorial, see Python 2.2.3) Guido van Rossum This paper is an incomplete draft. I am soliciting feedback. If you find any problems, please write me at guido@python.org. Table of Contents Change Log Introduction Subclassing built-in types Built-in types as factory functions Introspecting instances of built-in types Static metho...
Unifying types and classes in Python 2.2 Python Version: 2.2.3 Guido van Rossum This paper is an incomplete draft. I am soliciting feedback. If you find any problems, please write me at guido@python.org. Table of Contents Change Log Introduction Subclassing built-in types Built-in types as factory functions Introspecting instances of built-in types Static methods and class methods Properties: attributes defined by get/set methods Method resolution ord...
PEP 3141 -- A Type Hierarchy for Numbers PEP:3141 Title:A Type Hierarchy for Numbers Author:Jeffrey Yasskin <jyasskin at google.com> Status:Final Type:Standards Track Created:23-Apr-2007 Post-History:25-Apr-2007, 16-May-2007, 02-Aug-2007 Contents Abstract Rationale Specification Numeric Classes Changes to operations and __magic__ methods Notes for type implementors Adding More Numeric ABCs Implementing the arithmetic operations Rejected Alternatives The Decimal Type R...
PEP 3124 -- Overloading, Generic Functions, Interfaces, and Adaptation PEP:3124 Title:Overloading, Generic Functions, Interfaces, and Adaptation Author:Phillip J. Eby <pje at telecommunity.com> Discussions-To:python-3000 at python.org Status:Deferred Type:Standards Track Requires:3107 3115 3119 Created:28-Apr-2007 Post-History:30-Apr-2007 Replaces:245 246 Contents Deferred Abstract Rationale and Goals User API Overloading/Generic Functions @overload vs. @when Method ...
...reversed__, index, and count for free. Explicit subclassing makes it explicit that a class implements a particular protocol, making subtyping relationships easier to see. Type checkers can warn about missing protocol members or members with incompatible types more easily, without having to use hacks like dummy assignments discussed above in this section. Explicit subclassing makes it possible to force a class to be considered a subtype of a protocol (by using # type: ignore together with an expl...
...reversed this process. Not that it took me very long to learn the feature set. I wrote a working, usable fetchmailconf, with GUI, in six working days, of which perhaps the equivalent of two days were spent learning Python itself. This reflects another useful property of the language: it is compact -- you can hold its entire feature set (and at least a concept index of its libraries) in your head. C is a famously compact language. Perl is notoriously not; one of the things the notion "There'...
PEP 3151 -- Reworking the OS and IO exception hierarchy PEP:3151 Title:Reworking the OS and IO exception hierarchy Author:Antoine Pitrou <solipsis at pitrou.net> BDFL-Delegate:Barry Warsaw Status:Final Type:Standards Track Created:21-Jul-2010 Python-Version:3.3 Post-History: Resolution:https://mail.python.org/pipermail/python-dev/2011-October/114033.html Contents Abstract Rationale Confusing set of OS-related exceptions Lack of fine-grained exceptions Compatibility s...