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 3126 -- Remove Implicit String Concatenation PEP:3126 Title:Remove Implicit String Concatenation Author:Jim J. Jewett <JimJJewett at gmail.com>, Raymond Hettinger <python at rcn.com> Status:Rejected Type:Standards Track Created:29-Apr-2007 Post-History:29-Apr-2007, 30-Apr-2007, 07-May-2007 Contents Rejection Notice Abstract Motivation History or Future Problem Solution Concerns Operator Precedence Long Commands Regular Expressions Internationalization Transi...
PEP 521 -- Managing global context via 'with' blocks in generators and coroutines PEP:521 Title:Managing global context via 'with' blocks in generators and coroutines Author:Nathaniel J. Smith <njs at pobox.com> Status:Withdrawn Type:Standards Track Created:27-Apr-2015 Python-Version:3.6 Post-History:29-Apr-2015 Contents PEP Withdrawal Abstract Specification Nested blocks Other changes Rationale Alternative approaches Backwards compatibility Interaction with ...
PEP 526 -- Syntax for Variable Annotations PEP:526 Title:Syntax for Variable Annotations Author:Ryan Gonzalez <rymg19 at gmail.com>, Philip House <phouse512 at gmail.com>, Ivan Levkivskyi <levkivskyi at gmail.com>, Lisa Roach <lisaroach14 at gmail.com>, Guido van Rossum <guido at python.org> Status:Final Type:Standards Track Created:09-Aug-2016 Python-Version:3.6 Post-History:30-Aug-2016, 02-Sep-2016 Resolution:https://mail.python.org/pipermail/python-...
Towards a Standard Parser Generator Towards a Standard Parser Generator Martin v. Löwis Humboldt-Universität zu Berlin Institut für Informatik loewis@informatik.hu-berlin.de Abstract Developing parsers for "little" languages is a common task for many software developers. People have frequently requested inclusion of a specific parser generator framework into the Python library. In this paper, we compare several Python parser generators, using the XPath langua...
...vars: if T is a typevar, Literal[T] is not allowed. Typevars can vary over only types, never over values. The following are provisionally disallowed for simplicity. We can consider allowing them in future extensions of this PEP. Floats: e.g. Literal[3.14]. Representing Literals of infinity or NaN in a clean way is tricky; real-world APIs are unlikely to vary their behavior based on a float parameter. Any: e.g. Literal[Any]. Any is a type, and Literal[...] is meant to contain values only. It i...
PEP 482 -- Literature Overview for Type Hints PEP:482 Title:Literature Overview for Type Hints Author:Łukasz Langa <lukasz at python.org> Discussions-To:python-ideas at python.org Status:Final Type:Informational Created:08-Jan-2015 Post-History: Contents Abstract Existing Approaches for Python mypy Reticulated Python PyCharm Others Existing Approaches in Other Languages ActionScript Dart Hack TypeScript References Copyright Abstract This PEP is one of three relate...
PEP 216 -- Docstring Format PEP:216 Title:Docstring Format Author:moshez at zadka.site.co.il (Moshe Zadka) Status:Rejected Type:Informational Created:31-Jul-2000 Post-History: Superseded-By:287 Contents Notice Abstract Perl Documentation Java Documentation Python Docstring Goals High Level Solutions Docstring Format Goals Docstring Contents Docstring Basic Structure Unresolved Issues Rejected Suggestions Notice This PEP is rejected by the author. It has been superseded by ...
PEP 3104 -- Access to Names in Outer Scopes PEP:3104 Title:Access to Names in Outer Scopes Author:Ka-Ping Yee <ping at zesty.ca> Status:Final Type:Standards Track Created:12-Oct-2006 Python-Version:3.0 Post-History: Contents Abstract Rationale Other Languages JavaScript, Perl, Scheme, Smalltalk, GNU C, C# 2.0 Ruby (as of 1.8) Overview of Proposals New Syntax in the Binding (Outer) Scope Scope Override Declaration Required Variable Declaration New Syntax in the Referr...
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...
PSF Newsletter Signup Sign up for our approximately quarterly newsletter to receive important community news. You can view past issues here. Follow @ThePSF on Mastodon or X (Twitter) for the latest information. #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; } /* Add your own Mailchimp form style overrides in your site stylesheet or in this style block. We recommend moving this block and the preceding CSS link to the HEAD of your HTML...
PEP 636 -- Structural Pattern Matching: Tutorial PEP:636 Title:Structural Pattern Matching: Tutorial Author:Daniel F Moisset <dfmoisset at gmail.com> Sponsor:Guido van Rossum <guido at python.org> BDFL-Delegate: Discussions-To:python-dev at python.org Status:Final Type:Informational Created:12-Sep-2020 Python-Version:3.10 Post-History:22-Oct-2020, 08-Feb-2021 Resolution:https://mail.python.org/archives/list/python-committers@python.org/message/SQC2FTLFV5A7DV7RCEAR2I2...
...vars, co.co_cellvars) return type(f)(codeobj, f.func_globals, f.func_name, f.func_defaults, f.func_closure) def bind_all(mc, builtin_only=False, stoplist=[], verbose=False): """Recursively apply bind_constants() to functions in a module or class. Use as the last line of the module (after everything is defined, but before test code). In modules that need modifiable globals, set builtin_only to True. """ for k, v in vars(mc)....
...vars(types).values(): if type(t) is type: assert getattr(types, t.__name__) is t The types 'class', 'instance method' and 'dict-proxy' have already been renamed to the valid Python identifiers 'classobj', 'instancemethod' and 'dictproxy', making this possible. Backward compatibility Because of their widespread use it is not planned to actually remove the long names from the types module in some future version. However, the long names should be changed in documentation and library sources...
...vars.get_context_stack: def get_context_stack() -> List[Context]: return list(get_thread_state().current_context_stack.maps) That's all. Comparison to PEP 550 The main difference from PEP 550 is that it reified what we're calling "contexts" and "context stacks" as two different concrete types (LocalContext and ExecutionContext respectively). This led to lots of confusion about what the differences were, and which object should be used in which places. This proposal simplifies things ...
PEP 544 -- Protocols: Structural subtyping (static duck typing) PEP:544 Title:Protocols: Structural subtyping (static duck typing) Author:Ivan Levkivskyi <levkivskyi at gmail.com>, Jukka Lehtosalo <jukka.lehtosalo at iki.fi>, Łukasz Langa <lukasz at python.org> BDFL-Delegate:Guido van Rossum <guido at python.org> Discussions-To:python-dev at python.org Status:Accepted Type:Standards Track Created:05-Mar-2017 Python-Version:3.8 Resolution:https://mail.python...
Linux RPMs for Python 2.4 Linux RPMs for Python 2.4 Except where noted, these RPMs are made available by Sean Reifschneider (jafo-rpms@tummy.com). Having Problems? If you are having problems, please see the RPM Frequently Asked Questions section at the end of this document for possible solutions. RPMs For Other Platforms For platforms in which binaries aren't available here, you can easily build binary RPMs directly from the Python SRPM. Simply download one of the .src.rp...
Python 2.4.1 - Linux RPMs Linux RPMs for Python 2.4.1c2 Except where noted, these RPMs are made available by Sean Reifschneider (jafo-rpms@tummy.com). Having Problems? If you are having problems, please see the RPM Frequently Asked Questions section at the end of this document for possible solutions. RPMs For Other Platforms For platforms in which binaries aren't available here, you can easily build binary RPMs directly from the Python SRPM. Simply download one of the .src.rpm files ...
PEP 645 -- Allow writing optional types as x? PEP:645 Title:Allow writing optional types as x? Author:Maggie Moss <maggiebmoss at gmail.com> Sponsor:Guido van Rossum <guido at python.org> Status:Draft Type:Process Created:25-Aug-2020 Contents Abstract Motivation Rationale Specification Backwards Compatibility Reference Implementation Rejected Ideas References Copyright Abstract This PEP proposes adding a ? operator for types to allow writing int? in place of Opti...
...vars, co.co_cellvars) func.func_code = codeobj func.func_class = cls return func class autosuper_meta(type): def __init__(cls, name, bases, clsdict): UnboundMethodType = types.UnboundMethodType for v in vars(cls): o = getattr(cls, v) if isinstance(o, UnboundMethodType): _bind_autosuper(o.im_func, cls) class autosuper(object): __metaclass__ = autosuper_meta if __name__ == '__main__': class ...
Linux RPMs for Python 2.3.3 <h1>Linux RPMs for Python 2.3.3</h1> <p>Except where noted, these RPMs are made available by Sean Reifschneider (<a href="mailto:jafo-rpms@tummy.com">jafo-rpms@tummy.com</a>). <h3>Having Problems?</h3> If you are having problems, please see the <a href="#FAQ">RPM Frequently Asked Questions</a> section at the end of this document for possible solutions. <h3>RPMs For Other Platform...