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.
...frozensets Many common built-in types (such as str, bytes, dict, list, tuple) have dedicated opcodes to improve resource consumption when serializing and deserializing them; however, sets and frozensets don't. Adding such opcodes would be an obvious improvement. Also, dedicated set support could help remove the current impossibility of pickling self-referential sets [2]. Calling __new__ with keyword arguments Currently, classes whose __new__ mandates the use of keyword-only arguments can not...
...frozenset types were introduced in Python 2.4. The improvements are: Better hash algorithm for frozensets More compact pickle format (storing only an element list instead of a dictionary of key:value pairs where the value is always True). Use a __reduce__ function so that deep copying is automatic. The BaseSet concept was eliminated. The union_update() method became just update(). Auto-conversion between mutable and immutable sets was dropped. The _repr method was dropped (the need is met by t...
...frozenset types; for example: set(d.keys()) == d.keys() is guaranteed to be True (except when d is being modified simultaneously by another thread). Specification I'm using pseudo-code to specify the semantics: class dict: # Omitting all other dict methods for brevity. # The .iterkeys(), .itervalues() and .iteritems() methods # will be removed. def keys(self): return d_keys(self) def items(self): return d_items(self) def values(self): retu...
...frozenset(self) class xlist(list): def __freeze__(self): return tuple(self) class imdict(dict): def __hash__(self): return id(self) def _immutable(self, *args, **kws): raise TypeError('object is immutable') __setitem__ = _immutable __delitem__ = _immutable clear = _immutable update = _immutable setdefault = _immutable pop = _immutable popitem = _immutable class xdict(dict): def __freeze__(self): ...
...frozenset types are available as built-in types (PEP 218) unification of integers and long integers - an operation that would return a number too big for an integer will automatically return a long integer. (PEP 237) generator expressions - generator expressions are similar to a list comprehension, but instead of creating the entire list of results they create a generator that returns the results one by one. This allows for efficient handling of very large lists. (PEP 289) reversed() - a new bui...
Version: None
Released: March 23, 2020
This is an early developer preview of Python 3.9 Python 3.9 is still in development. This release, 3.9.0a5 is the fifth of six planned alpha releases. Alpha releases are intended to make it easier to test the current state of new features and bug fixes and to test the release …
View Release Notes
...FrozenSet[T] is also covariant. Let us consider int and float in place of T. First, int is a subtype of float. Second, set of values of FrozenSet[int] is clearly a subset of values of FrozenSet[float], while set of functions from FrozenSet[float] is a subset of set of functions from FrozenSet[int]. Therefore, by definition FrozenSet[int] is a subtype of FrozenSet[float]. List[T] is invariant. Indeed, although set of values of List[int] is a subset of values of List[float], only int could be appe...
Released: Aug. 30, 2021
This is the seventh maintenance release of Python 3.9 Note: The release you're looking at is Python 3.9.7, a bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here. There's been 187 commits …
Released: March 23, 2022
This is the twelfth maintenance release of Python 3.9 Note: The release you're looking at is Python 3.9.12, a bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here. This is a special …
Released: April 28, 2020
This is an early developer preview of Python 3.9 Python 3.9 is still in development. This release, 3.9.0a6 is the last out of six planned alpha releases. Alpha releases are intended to make it easier to test the current state of new features and bug fixes and to test the …
PEP 552 -- Deterministic pycs PEP:552 Title:Deterministic pycs Author:Benjamin Peterson <benjamin at python.org> Status:Final Type:Standards Track Created:04-Sep-2017 Python-Version:3.7 Post-History:07-Sep-2017 Resolution:https://mail.python.org/pipermail/python-dev/2017-September/149649.html Contents Abstract Rationale Specification References Credits Copyright Abstract This PEP proposes an extension to the pyc format to make it more deterministic. Rationale A rep...
Released: May 3, 2021
This is the fifth maintenance release of Python 3.9 Note: The release you're looking at is Python 3.9.5, a bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here. There's been 111 commits …
Released: Jan. 14, 2022
This is the ninth maintenance release of Python 3.9 Note: The release you're looking at is Python 3.9.10, a bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here. Major new features of …
Released: July 3, 2020
This is a beta preview of Python 3.9 Python 3.9 is still in development. This release, 3.9.0b4, is the fourth of five planned beta release previews. Beta release previews are intended to give the wider community the opportunity to test new features and bug fixes and to prepare their projects …
Released: July 20, 2020
This is a beta preview of Python 3.9 Python 3.9 is still in development. This release, 3.9.0b5, is the last of five planned beta release previews. Beta release previews are intended to give the wider community the opportunity to test new features and bug fixes and to prepare their projects …
Released: Sept. 17, 2020
This is the second release candidate of Python 3.9 This release, 3.9.0rc2, is the last preview before the final release of Python 3.9.0 on 2020-10-05. In the mean time, we strongly encourage maintainers of third-party Python projects to prepare their projects for 3.9 compatibility during this phase. As always, …
Released: Feb. 16, 2021
This is the release candidate of the second maintenance release of Python 3.9 Note: The release you're looking at is Python 3.9.2rc1, a release candidate of a bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release …
Released: April 2, 2021
This is the third maintenance release of Python 3.9 NOTE: The release you're looking at has been recalled due to unintentional breakage of ABI compatibility with C extensions built in Python 3.9.0 - 3.9.2. Details in bpo-43710. Please use Python 3.9.4 or newer instead. Python 3.9.3 is an …
Released: April 4, 2021
This is the fourth maintenance release of Python 3.9 Note: The release you're looking at is Python 3.9.4, a bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here. Python 3.9.4 is a …
Released: Nov. 5, 2021
This is the eighth maintenance release of Python 3.9 Note: The release you're looking at is Python 3.9.8, a bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here. There's been 202 commits …