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 Success Stories Background The Molecular Modeling Toolkit (MMTK) is a open source Python library for molecular modeling and simulation with a focus on biomolecular systems, written in a mixture of Python and C. It provides standard techniques such as Molecular Dynamics or normal mode calculations in a ready-to-use form, but also provides a basis of low-level operations on top of which new techniques can easily be implemented. I started developing MMTK in 1996. I had some experience wit...
PEP 353 -- Using ssize_t as the index type PEP:353 Title:Using ssize_t as the index type Author:Martin von Löwis <martin at v.loewis.de> Status:Final Type:Standards Track Created:18-Dec-2005 Post-History: Contents Abstract Rationale Specification Conversion guidelines Discussion Why not size_t Why not Py_intptr_t Doesn't this break much code? Doesn't this consume too much memory? Open Issues Copyright Abstract In Python 2.4, indices of sequences are restricted to the...
...Compilation of Compliant Wheels Docker Image Auditwheel Bundled Wheels on Linux Security Implications Platform Detection for Installers PyPI Support Rejected Alternatives Future updates References Copyright Abstract This PEP proposes the creation of a new platform tag for Python package built distributions, such as wheels, called manylinux1_{x86_64,i686} with external dependencies limited to a standardized, restricted subset of the Linux kernel and core userspace ABI. It proposes that PyP...
...compilation fails with an error on Py_IS_TYPE() which only takes 2 arguments. The bug is that the op and tp arguments of PyObject_TypeCheck() must be put between parentheses: replace Py_IS_TYPE(ob, tp) with Py_IS_TYPE((ob), (tp)). In regular C code, these parentheses are redundant, can be seen as a bug, and so are often forgotten when writing macros. To avoid Macro Pitfalls, the PyObject_TypeCheck() macro has been converted to a static inline function: commit. Examples of hard to read macros ...
...compilation, there is no hope for the compiler to know with sufficient certainty the values of any variables occurring in such expressions. This is widely though not universally considered too restrictive. Raymond Hettinger is the main advocate of this approach. He proposes a syntax where only a single literal of certain types is allowed as the case expression. It has the advantage of being unambiguous and easy to implement. My main complaint about this is that by disallowing "named constants...
Python Distutils-SIG: Proposed User Interface Python Distutils-SIG Proposed User Interface In addition to identifying the common tasks and division of labour involved in developing, distributing, and installing Python modules, the "Extension Building Considered Painful" Developer's Day Session also came up with a proposed user interface. The core idea of the interface is that the module developer would provide a small Python script, called setup.py ...
Retired SIGS These are SIGs that existed in the past but are no longer active. Their archives and home pages are retained. A retired SIG can be revived, using the same criteria as for creating a new SIG. Name Coordinator Description Info catalog-sig A.M. Kuchling The Python software catalog archive March 2013 compiler-sig Jeremy Hylton Compiling and parsing Python Type checking, code generation archive May 2001 do-sig David Arnold Distributed Object Technologies archive A...
...compilation, but it requires decorator to specify arguments types and it only supports numerical types. CPython 3.5 has almost no optimization: the peephole optimizer only implements basic optimizations. A static compiler is a compromise between CPython 3.5 and PyPy. Note There was also the Unladen Swallow project, but it was abandoned in 2011. Examples Following examples are not written to show powerful optimizations promising important speedup, but to be short and easy to understand, just...
...compilation. There must not be any Python statement on the line that contains the encoding declaration. If the first line matches the second line is ignored. To aid with platforms such as Windows, which add Unicode BOM marks to the beginning of Unicode files, the UTF-8 signature \xef\xbb\xbf will be interpreted as 'utf-8' encoding as well (even if no magic encoding comment is given). If a source file uses both the UTF-8 BOM mark signature and a magic encoding comment, the only allowed encoding ...
Python Success Stories Introduction Wing IDE is a commercial integrated development environment for the Python programming language. Wing provides developers with a full-featured source editor, debugger, code browser, and many other tools specifically designed for use with Python. Wing works with all forms of Python, whether running as a stand-alone app, under a web server, or in a custom embedded scripting environment. Several GUI layers (wxPython, PyQt, PyGTK, and Tkinter) are supported, as...
...compilation stages to detect and post-process these cases. Intermediate parse tree The last problem present in the current parser is the intermediate creation of a parse tree or Concrete Syntax Tree that is later transformed to an Abstract Syntax Tree. Although the construction of a CST is very common in parser and compiler pipelines, in CPython this intermediate CST is not used by anything else (it is only indirectly exposed by the parser module and a surprisingly small part of the code in th...
PEP 3132 -- Extended Iterable Unpacking PEP:3132 Title:Extended Iterable Unpacking Author:Georg Brandl <georg at python.org> Status:Final Type:Standards Track Created:30-Apr-2007 Python-Version:3.0 Post-History: Contents Abstract Rationale Specification Implementation Grammar change Changes to the Compiler Changes to the Bytecode Interpreter Acceptance References Copyright Abstract This PEP proposes a change to iterable unpacking syntax, allowing to specify a "catch...
PEP 3123 -- Making PyObject_HEAD conform to standard C PEP:3123 Title:Making PyObject_HEAD conform to standard C Author:Martin von Löwis <martin at v.loewis.de> Status:Final Type:Standards Track Created:27-Apr-2007 Python-Version:3.0 Post-History: Contents Abstract Rationale Specification Compatibility with Python 2.6 Copyright Abstract Python currently relies on undefined C behavior, with its usage of PyObject_HEAD. This PEP proposes to change that into standard C. ...
PEP 242 -- Numeric Kinds PEP:242 Title:Numeric Kinds Author:paul at pfdubois.com (Paul F. Dubois) Status:Rejected Type:Standards Track Created:17-Mar-2001 Python-Version:2.2 Post-History:17-Apr-2001 Contents Abstract Rationale Supported Kinds of Ints and Floats Kind Objects Attributes of Module kinds Complex Numbers Examples Open Issues Rejection Copyright Abstract This proposal gives the user optional control over the precision and range of numeric computations so that a c...
PEP 7 -- Style Guide for C Code PEP:7 Title:Style Guide for C Code Author:Guido van Rossum <guido at python.org>, Barry Warsaw <barry at python.org> Status:Active Type:Process Created:05-Jul-2001 Post-History: Contents Introduction C dialect Code lay-out Naming conventions Documentation Strings Copyright Introduction This document gives coding conventions for the C code comprising the C implementation of Python. Please see the companion informational PEP describ...
PEP 269 -- Pgen Module for Python PEP:269 Title:Pgen Module for Python Author:jriehl at spaceship.com (Jonathan Riehl) Status:Deferred Type:Standards Track Created:24-Aug-2001 Python-Version:2.2 Post-History: Contents Abstract Rationale Specification parseGrammarFile (fileName) -> AST parseGrammarString (text) -> AST buildParser (grammarAst) -> DFA parseFile (fileName, dfa, start) -> AST parseString (text, dfa, start) -> AST symbolToStringMap (dfa) -> dict st...
PEP 275 -- Switching on Multiple Values PEP:275 Title:Switching on Multiple Values Author:mal at lemburg.com (Marc-André Lemburg) Status:Rejected Type:Standards Track Created:10-Nov-2001 Python-Version:2.6 Post-History: Contents Rejection Notice Abstract Problem Proposed Solutions Solution 1: Optimizing if-elif-else Solution 2: Adding a switch statement to Python New Syntax Implementation Issues Examples Scope Credits References Copyright Rejection Notice A similar PEP ...
...compilation: offsets of other fields may have changed, making the extension modules access the wrong data. In some cases, the incompatibilities only affect internal objects of the interpreter, such as frame or code objects. For example, the way line numbers are represented has changed in the 2.x lifetime, as has the way in which local variables are stored (due to the introduction of closures). Even though most applications probably never used these objects, changing them had required to change t...
Highlights: Python 2.5 Highlights: Python 2.5 Here are some of the (subjective) highlights of Python 2.5. More detail on almost all of the new features can be found in the document What's New In Python 2.5 More Reliable Python now uses the Buildbot tool for continuous testing on a wide range of platforms. This allows us to spot problems faster during development, and resulted in a much more robust release. Andrew Kuchling determined that there were over 350 patches and over 450 bugs fixed ...
PEP 649 -- Deferred Evaluation Of Annotations Using Descriptors PEP:649 Title:Deferred Evaluation Of Annotations Using Descriptors Author:Larry Hastings <larry at hastings.org> Status:Draft Type:Standards Track Created:11-Jan-2021 Post-History:11-Jan-2021, 11-Apr-2021 Contents Abstract Overview Motivation Backwards Compatibility Mistaken Rejection Of This Approach In November 2017 Implementation from __future__ import co_annotations __co_annotations__ Unbound code objects...