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.
...template for ensuring that a lock, acquired at the start of a block, is released when the block is left: def locking(lock): lock.acquire() try: yield None finally: lock.release() Used as follows: block locking(myLock): # Code here executes with myLock held. The lock is # guaranteed to be released when the block is left (even # if via return or by an uncaught exception). A template for opening a file that ensures the file is closed when the block is l...
...template pages into Python servlets whose output is sent by the HTTP server to the user's browser. Although this was a fairly simple exercise, we did run into some problems stemming from our design of the CORE database meta-class. We found that altering classes and modules at runtime, as is done by the meta-class, violates guidelines imposed by Python's optional restricted execution environment. Since we felt that restricted execution was a necessary component in supporting a persistent web modu...
...templates by defining new markup tags and controlling how these tags would be transformed into HTML, somewhat like XML/XSL does now. Unfortunately hsc had certain limitations: It didn't support local variables, and there were no control structures except conditionals. Even arithmetic was not possible. Our first web sites developed with this system consisted of a mix of hsc macros and Perl scripts that generated hsc source files. In 1998, hsc's author halted further development, and we became qui...
PEP 217 -- Display Hook for Interactive Use PEP:217 Title:Display Hook for Interactive Use Author:moshez at zadka.site.co.il (Moshe Zadka) Status:Final Type:Standards Track Created:31-Jul-2000 Python-Version:2.1 Post-History: Contents Abstract Interface Solution Jython Issues Abstract Python's interactive mode is one of the implementation's great strengths -- being able to write expressions on the command line and get back a meaningful output. However, the output function ...
PEP 20 -- The Zen of Python PEP:20 Title:The Zen of Python Author:tim.peters at gmail.com (Tim Peters) Status:Active Type:Informational Created:19-Aug-2004 Post-History:22-Aug-2004 Contents Abstract The Zen of Python Easter Egg References Copyright Abstract Long time Pythoneer Tim Peters succinctly channels the BDFL's guiding principles for Python's design into 20 aphorisms, only 19 of which have been written down. The Zen of Python Beautiful is better than ugly. Explicit...
PEP 271 -- Prefixing sys.path by command line option PEP:271 Title:Prefixing sys.path by command line option Author:fred at arakne.com (Frédéric B. Giacometti) Status:Rejected Type:Standards Track Created:15-Aug-2001 Python-Version:2.2 Post-History: Contents Abstract Rationale Other Information When to use this option Reference Implementation Copyright Abstract At present, setting the PYTHONPATH environment variable is the only method for defining additional Python module s...
PEP 5 -- Guidelines for Language Evolution PEP:5 Title:Guidelines for Language Evolution Author:paul at prescod.net (Paul Prescod) Status:Active Type:Process Created:26-Oct-2000 Post-History: Contents Abstract Implementation Details Scope Steps For Introducing Backwards-Incompatible Features Abstract In the natural evolution of programming languages it is sometimes necessary to make changes that modify the behavior of older programs. This PEP proposes a policy for implementi...
PEP 160 -- Python 1.6 Release Schedule PEP:160 Title:Python 1.6 Release Schedule Author:Fred L. Drake, Jr. <fred at fdrake.net> Status:Final Type:Informational Created:25-Jul-2000 Python-Version:1.6 Post-History: Contents Introduction Schedule Features Mechanism Copyright Introduction This PEP describes the Python 1.6 release schedule. The CVS revision history of this file contains the definitive historical record. This release will be produced by BeOpen PythonLabs s...
PEP 424 -- A method for exposing a length hint PEP:424 Title:A method for exposing a length hint Author:Alex Gaynor <alex.gaynor at gmail.com> Status:Final Type:Standards Track Created:14-Jul-2012 Python-Version:3.4 Post-History:15-Jul-2012 Contents Abstract Specification Rationale Copyright Abstract CPython currently defines a __length_hint__ method on several types, such as various iterators. This method is then used by various other functions (such as list) to pre...
PEP 3 -- Guidelines for Handling Bug Reports PEP:3 Title:Guidelines for Handling Bug Reports Author:jeremy at alum.mit.edu (Jeremy Hylton) Status:Withdrawn Type:Process Created:25-Sep-2000 Post-History: Contents Introduction Original Guidelines References Introduction This PEP contained guidelines for handling bug reports in the Python bug tracker. It has been replaced by the Developer's Guide description of issue triaging at https://docs.python.org/devguide/triaging.html ...
...Template, it is felt that each serves a distinct need, and that one does not obviate the other. This proposal is for a mechanism which, like '%', is efficient for small strings which are only used once, so, for example, compilation of a string into a template is not contemplated in this proposal, although the proposal does take care to define format strings and the API in such a way that an efficient template package could reuse the syntax and even some of the underlying formatting code. Spec...
...template budget anyone can use. If remaining funds will be used to support regional Python efforts, please tell us about it. Event requirements: If your request is for a workshop/training, we would like to know more about the mentors and educational content. We prefer a high staff:student ratio of at least 1:10 (one staff per ten students). We require a curriculum with learning outcomes for participants as well. An outline is not sufficient, we would like to see code repositories, worksheets, ...
...template=search&status=1">Python Bug Tracker</a> has a search form. </UL> <a name="hints"><H3>Where to search?</H3></a> <UL> <LI>If you're looking for a particular module or a module to do a particular thing, use the <a href="http://pypi.python.org/pypi/">Python Package Index</a><P> <LI>If you have a problem installing or using Python, the best place to start is the FAQ (listed above), followe...
PEP 295 -- Interpretation of multiline string constants PEP:295 Title:Interpretation of multiline string constants Author:yozh at mx1.ru (Stepan Koltsov) Status:Rejected Type:Standards Track Created:22-Jul-2002 Python-Version:3.0 Post-History: Contents Abstract Rationale Implementation Alternatives Copyright Abstract This PEP describes an interpretation of multiline string constants for Python. It suggests stripping spaces after newlines and stripping a newline if it is fi...
PEP 10 -- Voting Guidelines PEP:10 Title:Voting Guidelines Author:barry at python.org (Barry Warsaw) Status:Active Type:Process Created:07-Mar-2002 Post-History:07-Mar-2002 Contents Abstract Rationale Voting Scores References Copyright Abstract This PEP outlines the python-dev voting guidelines. These guidelines serve to provide feedback or gauge the "wind direction" on a particular proposal, idea, or feature. They don't have a binding force. Rationale When a new idea, f...
...template from example 1; for 'asynchronize' we can use a similar "unlocking" template. I don't think having an "anonymous" lock associated with a code block is all that important; in fact it may be better to always be explicit about the mutex being used. PEP 340 and PEP 346 also overlapped with this PEP, but were voluntarily withdrawn when this PEP was submitted. Some discussion of earlier incarnations of this PEP took place on the Python Wiki [3]. Motivation and Summary PEP 340, Anonymous B...
...template library. The administrative interface to the site is written using the Quixote Web application framework, and employs mod_scgi behind Apache 2. This interface provides the site administrators access to all of the functions they need to interact with user's profiles, process log files to provide reports about site activity and issues, and update site content. Quixote and mod_scgi have performed extremely well in this application, and plans call for them to replace the current SimpleTAL a...
Python Success Stories The University of St Andrews, founded in 1411, is Scotland's oldest university Zoom in Introduction The IT Services department at the University of St Andrews, Scotland, develops and maintains software systems used in a variety of capacities throughout the university. I had several years of experience working with Perl when I took my first serious look at Python back in 1999. Our team's projects were becoming bigger and more complex, and it was obvious that we needed t...
PEP 464 -- Removal of the PyPI Mirror Authenticity API PEP:464 Title:Removal of the PyPI Mirror Authenticity API Author:Donald Stufft <donald at stufft.io> BDFL-Delegate:Richard Jones <richard at python.org> Discussions-To:distutils-sig at python.org Status:Final Type:Process Created:02-Mar-2014 Post-History:04-Mar-2014 Replaces:381 Resolution:https://mail.python.org/pipermail/distutils-sig/2014-March/024027.html Contents Abstract Rationale Plan for Deprecation ...
PEP 332 -- Byte vectors and String/Unicode Unification PEP:332 Title:Byte vectors and String/Unicode Unification Author:Skip Montanaro <skip at pobox.com> Status:Rejected Type:Standards Track Created:11-Aug-2004 Python-Version:2.5 Post-History: Contents Abstract Rejection Notice Rationale Proposed Implementation Bytes Object API Issues Copyright Abstract This PEP outlines the introduction of a raw bytes sequence object and the unification of the current str and unicod...