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.
Python Patterns - An Optimization Anecdote Warning This page stays here for historical reasons and it may contain outdated or incorrect information. The other day, a friend asked me a seemingly simple question: what's the best way to convert a list of integers into a string, presuming that the integers are ASCII values. For instance, the list [97, 98, 99] should be converted to the string 'abc'. Let's assume we want to write a function to do this. The first version I came ...
PEP 452 -- API for Cryptographic Hash Functions v2.0 PEP:452 Title:API for Cryptographic Hash Functions v2.0 Author:A.M. Kuchling <amk at amk.ca>, Christian Heimes <christian at python.org> Status:Final Type:Informational Created:15-Aug-2013 Post-History: Replaces:247 Contents Abstract Specification Rationale Changes from Version 1.0 to Version 2.0 Recommended names for common hashing algorithms Changes Acknowledgements Copyright Abstract There are several diffe...
PEP 3154 -- Pickle protocol version 4 PEP:3154 Title:Pickle protocol version 4 Author:Antoine Pitrou <solipsis at pitrou.net> Status:Final Type:Standards Track Created:11-Aug-2011 Python-Version:3.4 Post-History:12-Aug-2011 Resolution:https://mail.python.org/pipermail/python-dev/2013-November/130439.html Contents Abstract Rationale Proposed changes Framing Binary encoding for all opcodes Serializing more "lookupable" objects 64-bit opcodes for large objects Native opcod...
PEP 3127 -- Integer Literal Support and Syntax PEP:3127 Title:Integer Literal Support and Syntax Author:Patrick Maupin <pmaupin at gmail.com> Discussions-To:python-3000 at python.org Status:Final Type:Standards Track Created:14-Mar-2007 Python-Version:3.0 Post-History:18-Mar-2007 Contents Abstract Motivation Specification Grammar specification int() specification long() specification Tokenizer exception handling int() exception handling oct() function Output formatting ...
PEP 659 -- Specializing Adaptive Interpreter PEP:659 Title:Specializing Adaptive Interpreter Author:Mark Shannon <mark at hotpy.org> Status:Draft Type:Informational Created:13-Apr-2021 Post-History:11-May-2021 Contents Abstract Motivation Rationale Performance Implementation Overview Quickening Adaptive instructions Specialization Ancillary data Data layout Example families of instructions CALL_FUNCTION LOAD_GLOBAL Compatibility Costs Memory use Comparing memory use...
PEP 524 -- Make os.urandom() blocking on Linux PEP:524 Title:Make os.urandom() blocking on Linux Author:Victor Stinner <vstinner at python.org> Status:Final Type:Standards Track Created:20-Jun-2016 Python-Version:3.6 Contents Abstract The bug Original bug Status in Python 3.5.2 Use Cases Use Case 1: init script Use case 1.1: No secret needed Use case 1.2: Secure secret required Use Case 2: Web server Fix system urandom Load entropy from disk at boot Virtual machines...
PEP 356 -- Python 2.5 Release Schedule PEP:356 Title:Python 2.5 Release Schedule Author:Neal Norwitz, Guido van Rossum, Anthony Baxter Status:Final Type:Informational Created:07-Feb-2006 Python-Version:2.5 Post-History: Contents Abstract Release Manager Release Schedule Completed features for 2.5 Possible features for 2.5 Deferred until 2.6 Open issues References Copyright Abstract This document describes the development and release schedule for Python 2.5. The schedule pr...
PEP 368 -- Standard image protocol and class PEP:368 Title:Standard image protocol and class Author:Lino Mastrodomenico <l.mastrodomenico at gmail.com> Status:Deferred Type:Standards Track Created:28-Jun-2007 Python-Version:2.6, 3.0 Post-History: Contents Abstract PEP Deferral Rationale Specification Python API Mode Objects Image Protocol Image and ImageMixin Classes Line Objects Pixel Objects ImageSize Class C API Examples Backwards Compatibility Reference Implement...
Notes (editors: check NEWS.help for information about editing NEWS using ReST.) What's New in Python 2.3.5? Release date: 08-FEB-2005 Core and builtins Partially revert the fix for #1074011; don't try to fflush stdin anymore. Library Applied a security fix to SimpleXMLRPCserver (PSF-2005-001). This disables recursive traversal through instance attributes, which can be exploited in various ways. Bug #1114776. Applied a fix to the copy.py fix in 2.3.5rc1 to deal with types that don't hav...
PEP 427 -- The Wheel Binary Package Format 1.0 PEP:427 Title:The Wheel Binary Package Format 1.0 Author:Daniel Holth <dholth at gmail.com> BDFL-Delegate:Nick Coghlan <ncoghlan at gmail.com> Discussions-To:distutils-sig at python.org Status:Final Type:Standards Track Created:20-Sep-2012 Post-History:18-Oct-2012, 15-Feb-2013 Resolution:https://mail.python.org/pipermail/python-dev/2013-February/124103.html Contents Canonical specification Abstract PEP Acceptance Rat...
PEP 436 -- The Argument Clinic DSL PEP:436 Title:The Argument Clinic DSL Author:Larry Hastings <larry at hastings.org> Discussions-To:python-dev at python.org Status:Final Type:Standards Track Created:22-Feb-2013 Contents Abstract Rationale and Goals DSL Syntax Summary General Behavior Of the Argument Clinic DSL Module and Class Declarations Function Declaration Parameter Declaration Legacy Converters Parameter Docstrings Special Syntax For Parameter Lines Function Docstr...
PEP 287 -- reStructuredText Docstring Format PEP:287 Title:reStructuredText Docstring Format Author:David Goodger <goodger at python.org> Discussions-To:doc-sig at python.org Status:Active Type:Informational Created:25-Mar-2002 Post-History:02-Apr-2002 Replaces:216 Contents Abstract Benefits Goals Rationale Specification Docstring-Significant Features Questions & Answers References & Footnotes Copyright Acknowledgements Abstract When plaintext hasn't been exp...
PEP 491 -- The Wheel Binary Package Format 1.9 PEP:491 Title:The Wheel Binary Package Format 1.9 Author:Daniel Holth <dholth at gmail.com> Discussions-To:distutils-sig at python.org Status:Deferred Type:Standards Track Created:16-Apr-2015 Contents Abstract PEP Deferral Rationale Details Installing a wheel 'distribution-1.0-py32-none-any.whl' Recommended installer features Recommended archiver features File Format File name convention Escaping and Unicode File contents T...
PEP 418 -- Add monotonic time, performance counter, and process time functions PEP:418 Title:Add monotonic time, performance counter, and process time functions Author:Cameron Simpson <cs at cskk.id.au>, Jim Jewett <jimjjewett at gmail.com>, Stephen J. Turnbull <stephen at xemacs.org>, Victor Stinner <vstinner at python.org> Status:Final Type:Standards Track Created:26-Mar-2012 Python-Version:3.3 Contents Abstract Rationale Python functions New Functions...
Python 2.4.1 - Release Notes (editors: check NEWS.help for information about editing NEWS using ReST.) What's New in Python 2.4.1 final? Release date: 30-MAR-2005 Core and builtins Move exception finalisation later in the shutdown process - this fixes the crash seen in bug #1165761 Tests SF patch 1167316: doctest.py fails self-test if run directly. Build SF patch 1171767: Darwin 8's headers are anal about POSIX compliance, and linking has changed (prebinding is now deprecated, and l...
What's New In Python 3.0 (editors: check NEWS.help for information about editing NEWS using ReST.) What's New in Python 3.0 final Release date: 03-Dec-2008 Core and Builtins Issue #3996: On Windows, the PyOS_CheckStack function would cause the interpreter to abort ("Fatal Python error: Could not reset the stack!") instead of throwing a MemoryError. Issue #3689: The list reversed iterator now supports __length_hint__ instead of __len__. Behavior now matches other reversed iter...