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.
...compilation and program analysis issues. Unlike most SIGs, it does not have a specific mandate or deliverable. There are several independent projects to develop compilers, type checkers, and related tools. The CPython and JPython distributions also contain compilers, of course; future versions of these compilers will also be discussed on this sig. There will likely be some overlap between the types-sig and the compiler-sig: The compiler will be responsible for implementing the type...
...compilation, plus any additional overhead of macro processing. It is worth noting that the speed of source to bytecode compilation is largely irrelevant for Python performance. Implementation In order to allow transformation of the AST at compile time by Python code, all AST nodes in the compiler will have to be Python objects. To do that efficiently, will mean making all the nodes in the _ast module immutable, so as not degrade performance by much. They will need to be immutable to guarantee ...
PEP 264 -- Future statements in simulated shells PEP:264 Title:Future statements in simulated shells Author:Michael Hudson <mwh at python.net> Status:Final Type:Standards Track Requires:236 Created:30-Jul-2001 Python-Version:2.2 Post-History:30-Jul-2001 Contents Abstract Specification Backward Compatibility Forward Compatibility Issues Implementation References Copyright Abstract As noted in PEP 236, there is no clear way for "simulated interactive shells" to simulat...
PEP 267 -- Optimized Access to Module Namespaces PEP:267 Title:Optimized Access to Module Namespaces Author:jeremy at alum.mit.edu (Jeremy Hylton) Status:Deferred Type:Standards Track Created:23-May-2001 Python-Version:2.2 Post-History: Contents Deferral Abstract Introduction DLict design Compiler issues Runtime model Backwards compatibility Related PEPs Copyright Deferral While this PEP is a nice idea, no-one has yet emerged to do the work of hashing out the differences be...
PEP 236 -- Back to the __future__ PEP:236 Title:Back to the __future__ Author:Tim Peters <tim.peters at gmail.com> Status:Final Type:Standards Track Created:26-Feb-2001 Python-Version:2.1 Post-History:26-Feb-2001 Contents Motivation Intent Syntax Semantics Example Standard Module __future__.py Resolved Problem: Runtime Compilation Resolved Problem: Native Interactive Shells Resolved Problem: Simulated Interactive Shells Questions and Answers What about a "from __past_...
PEP 224 -- Attribute Docstrings PEP:224 Title:Attribute Docstrings Author:mal at lemburg.com (Marc-André Lemburg) Status:Rejected Type:Standards Track Created:23-Aug-2000 Python-Version:2.1 Post-History: Contents Introduction Rationale Implementation Caveats of the Implementation Possible Problems Comments from our BDFL Copyright References Introduction This PEP describes the "attribute docstring" proposal for Python 2.0. This PEP tracks the status and ownership of this fe...
...compilation from source code to bytecode involved two steps: Parse the source code into a parse tree (Parser/pgen.c) Emit bytecode based on the parse tree (Python/compile.c) Historically, this is not how a standard compiler works. The usual steps for compilation are: Parse source code into a parse tree (Parser/pgen.c) Transform parse tree into an Abstract Syntax Tree (Python/ast.c) Transform AST into a Control Flow Graph (Python/compile.c) Emit bytecode based on the Control Flow Graph (Pytho...
PEP 227 -- Statically Nested Scopes PEP:227 Title:Statically Nested Scopes Author:jeremy at alum.mit.edu (Jeremy Hylton) Status:Final Type:Standards Track Created:01-Nov-2000 Python-Version:2.1 Post-History: Contents Abstract Introduction Specification Discussion Examples Backwards compatibility Compatibility of C API locals() / vars() Warnings and Errors import * used in function scope bare exec in function scope local shadows global Rebinding names in enclosing scopes Impl...
...compilation of the language itself required cross-compilation. Rewriting the Lua Layouts Once the Python-based implementation of the GUI layout tools was complete, it became necessary to rewrite the existing Lua layouts using Python. Our layout coders embraced Python with open arms because it solved all the problems they had been having with Lua, and it made new code easier to write because of Python's straightforward syntax and extensive standard libraries. In this transition, we found that P...
...compilation infrastructure to boost regex performance [74]. Unladen Swallow has developed benchmarks for Python regular expression performance ([75], [76], [77]), but work on regex performance is still at an early stage [78]. Trace compilation [92], [93]. Based on the results of PyPy and Tracemonkey [94], we believe that a CPython JIT should incorporate trace compilation to some degree. We initially avoided a purely-tracing JIT compiler in favor of a simpler, function-at-a-time compiler. However...
...compilation and other processing done) for the major platforms. Module distributions must have a standardized way to express their dependencies on other modules (both simple presence/absence and required version number) and on Python itself (version number), and these dependencies must be checked at setup/build/install time. It must be possible (and preferably easy) to instead download and build from a source dis...
...compilation files Multiple file extensions .pyc Reference implementation References ACKNOWLEDGMENTS Copyright Abstract This PEP describes an extension to Python's import mechanism which improves sharing of Python source code files among multiple installed different versions of the Python interpreter. It does this by allowing more than one byte compilation file (.pyc files) to be co-located with the Python source file (.py file). The extension described here can also be used to support dif...
...compilation to machine code. Also, Jython and IronPython (see below) support JIT compilation on their respective virtual machine implementations. Python plays well with others Python can integrate with COM, .NET, and CORBA objects. For Java libraries, use Jython, an implementation of Python for the Java Virtual Machine. For .NET, try IronPython , Microsoft's new implementation of Python for .NET, or Python for .NET. Python is also supported for the Internet Communications Engine (ICE) and many...
PEP 577 -- Augmented Assignment Expressions PEP:577 Title:Augmented Assignment Expressions Author:Nick Coghlan <ncoghlan at gmail.com> Status:Withdrawn Type:Standards Track Created:14-May-2018 Python-Version:3.8 Post-History:22-May-2018 Contents PEP Withdrawal Abstract Syntax and semantics Augmented assignment expressions Adding an inline assignment operator Assignment operator precedence Augmented assignment to names in block scopes Augmented assignment to names in scop...
Notes Python 2.1.3 Release Notes Release date: 08-April-2002 What's new in Python 2.1.3 (final)? Core Fixed two bugs reported as SF #535905: under certain conditions, deallocating a deeply nested structure could cause a segfault in the garbage collector, due to interaction with the "trashcan" code; access to the current frame during destruction of a local variable could access a pointer to freed memory. SF #457466: popenx() argument mangling hangs python (win9x only). Under certa...
...compilation file (.pyc) to be co-located with each source file. This PEP defines an adjunct feature which allows the co-location of extension module files (.so) in a similar manner. This optional, build-time feature will enable downstream distributions of Python to more easily provide more than one Python major version at a time. Background PEP 3147 defined the file system layout for a pure-Python package, where multiple versions of Python are available on the system. For example, where the ...
PEP 215 -- String Interpolation PEP:215 Title:String Interpolation Author:ping at zesty.ca (Ka-Ping Yee) Status:Superseded Type:Standards Track Created:24-Jul-2000 Python-Version:2.1 Post-History: Superseded-By:292 Contents Abstract Copyright Specification Examples Discussion Security Issues Implementation References Abstract This document proposes a string interpolation feature for Python to allow easier string formatting. The suggested syntax change is the introduction ...
...compilation or linker flags. However, in the common case where setup.py works correctly, everything in Setup will remain commented out. The other Setup.* become unnecessary, since nothing will be generating Setup automatically. The patch was checked in for Python 2.1, and has been subsequently modified. Implementation Patch #102588 on SourceForge contains the proposed patch. Currently the patch tries to be conservative and to change as few files as possible, in order to simplify backing out...
...compilation pass. Python/compile.c: You will need to create or modify the compiler_* functions to generate opcodes for your productions. You may need to regenerate Lib/symbol.py and/or Lib/token.py and/or Lib/keyword.py. The parser module. Add some of your new syntax to test_parser, bang on Modules/parsermodule.c until it passes. Add some usage of your new syntax to test_grammar.py. The compiler package. A good test is to compile the standard library and test suite with the compiler package an...