Newest Python PEPshttps://www.python.org/dev/peps/Newest Python Enhancement Proposals (PEPs) - Information on new language features, and some meta-information like release procedure and schedulesWed, 23 Feb 2022 00:29:42 GMTPyRSS2Gen-1.1.0http://blogs.law.harvard.edu/tech/rssPEP 683: Immortal Objects, Using a Fixed Refcounthttps://www.python.org/dev/peps/pep-0683/Currently the CPython runtime maintains a small amount of mutable state in the allocated memory of each object. Because of this, otherwise immutable objects are actually mutable. This can have a large negative impact on CPU and memory performance, especially for approaches to increasing Python's scalability. The solution proposed here provides a way to mark an object as one for which that per-object runtime state should not change.Eric Snow <ericsnowcurrently@gmail.com>, Eddie Elizondo <eduardo.elizondorueda@gmail.com>https://www.python.org/dev/peps/pep-0683/Thu, 10 Feb 2022 00:00:00 GMTPEP 682: Format Specifier for Signed Zerohttps://www.python.org/dev/peps/pep-0682/Though float and Decimal types can represent signed zero, in many fields of mathematics negative zero is surprising or unwanted -- especially in the context of displaying an (often rounded) numerical result. This PEP proposes an extension to the string format specification allowing negative zero to be normalized to positive zero.John Belmonte <john@neggie.net>https://www.python.org/dev/peps/pep-0682/Sat, 29 Jan 2022 00:00:00 GMTPEP 679: Allow parentheses in assert statementshttps://www.python.org/dev/peps/pep-0679/This PEP proposes to allow parentheses surrounding the two-argument form of assert statements. This will cause the interpreter to reinterpret what before would have been an assert with a two-element tuple that will always be True (assert (expression, message)) to an assert statement with a subject and a failure message, equivalent to the statement with the parentheses removed (assert expression, message).Pablo Galindo Salgado <pablogsal@python.org>https://www.python.org/dev/peps/pep-0679/Fri, 07 Jan 2022 00:00:00 GMTPEP 680: tomllib: Support for Parsing TOML in the Standard Libraryhttps://www.python.org/dev/peps/pep-0680/This PEP proposes adding the tomllib module to the standard library for parsing TOML (Tom's Obvious Minimal Language, https://toml.io).Taneli Hukkinen, Shantanu Jain <hauntsaninja at gmail.com>https://www.python.org/dev/peps/pep-0680/Sat, 01 Jan 2022 00:00:00 GMTPEP 678: Enriching Exceptions with Noteshttps://www.python.org/dev/peps/pep-0678/Exception objects are typically initialized with a message that describes the error which has occurred. Because further information may be available when the exception is caught and re-raised, or included in an ExceptionGroup, this PEP proposes to add BaseException.add_note(note, *, replace=False), a .__notes__ attribute holding a tuple of zero or more notes so added, and to update the builtin traceback formatting code to include notes in the formatted traceback following the exception string.Zac Hatfield-Dodds <zac@zhd.dev>https://www.python.org/dev/peps/pep-0678/Mon, 20 Dec 2021 00:00:00 GMTPEP 677: Callable Type Syntaxhttps://www.python.org/dev/peps/pep-0677/This PEP introduces a concise and friendly syntax for callable types, supporting the same functionality as typing.Callable but with an arrow syntax inspired by the syntax for typed function signatures. This allows types like Callable[[int, str], bool] to be written as (int, str) -> bool.Steven Troxler <steven.troxler@gmail.com>,https://www.python.org/dev/peps/pep-0677/Mon, 13 Dec 2021 00:00:00 GMTPEP 681: Data Class Transformshttps://www.python.org/dev/peps/pep-0681/PEP 557 introduced the dataclass to the Python stdlib. Several popular libraries have behaviors that are similar to dataclasses, but these behaviors cannot be described using standard type annotations. Such projects include attrs, pydantic, and object relational mapper (ORM) packages such as Django and EdgeDB.Erik De Bonte <erikd at microsoft.com>,https://www.python.org/dev/peps/pep-0681/Thu, 02 Dec 2021 00:00:00 GMTPEP 675: Arbitrary Literal String Typehttps://www.python.org/dev/peps/pep-0675/There is currently no way to specify, using type annotations, that a function parameter can be of any literal string type. We have to specify a precise literal string type, such as Literal["foo"]. This PEP introduces a supertype of literal string types: LiteralString. This allows a function to accept arbitrary literal string types, such as Literal["foo"] or Literal["bar"].Pradeep Kumar Srinivasan <gohanpra@gmail.com>, Graham Bleaney <gbleaney@gmail.com>https://www.python.org/dev/peps/pep-0675/Tue, 30 Nov 2021 00:00:00 GMTPEP 674: Disallow using macros as l-valueshttps://www.python.org/dev/peps/pep-0674/Disallow using macros as l-values. For example, Py_TYPE(obj) = new_type now fails with a compiler error.Victor Stinner <vstinner@python.org>https://www.python.org/dev/peps/pep-0674/Tue, 30 Nov 2021 00:00:00 GMTPEP 673: Self Typehttps://www.python.org/dev/peps/pep-0673/This PEP introduces a simple and intuitive way to annotate methods that return an instance of their class. This behaves the same as the TypeVar-based approach specified in PEP 484 but is more concise and easier to follow.Pradeep Kumar Srinivasan <gohanpra@gmail.com>,https://www.python.org/dev/peps/pep-0673/Wed, 10 Nov 2021 00:00:00 GMT