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.
...sub-paragraph of another paragraph if the other paragraph is the last preceding paragraph that has a lower level. In doc strings the level 0 indentation (left margin) is set to the starting column of the first non-blank line after the first line. This means the first tab(s) or 8 characters, for example, are stripped off the doc string in the process. Folks using python-mode won't have to worry; indentation will be correct. Special symbology...
...subgroup and split can take an exception type or tuple of exception types and treat it as a shorthand for matching that type: eg.split(T) divides eg into the subgroup of leaf exceptions that match the type T, and the subgroup of those that do not (using the same check as except for a match). Subclassing Exception Groups It is possible to subclass exception groups, but when doing that it is usually necessary to specify how subgroup() and split() should create new instances for the matching or no...
...sub(var_value): await asyncio.sleep(1) var.set(var_value) async def main(): var.set('main') # waiting for sub() directly await sub('sub-1') # var change is visible assert var.get() == 'sub-1' # waiting for sub() with a timeout; await asyncio.wait_for(sub('sub-2'), timeout=2) # wait_for() creates an implicit task, which isolates # context changes, which means that the below assertion # will fail. assert var.get() == 'sub-2' # AssertionErr...
...sub-scope would be required to safely capture the exception object - something akin to the way a list comprehension is handled. However, CPython currently implements a comprehension's subscope with a nested function call, which has consequences in some contexts such as class definitions, and is therefore unsuitable for this proposal. Should there be, in future, a way to create a true subscope (which could simplify comprehensions, except expressions, with blocks, and possibly more), then this p...
...subject, and matching fails. For example, matching the pattern Point2d(x, 0) to the subject Point2d(3, 0) successfully matches. The match also binds the pattern's free variable x to the subject's value 3. As another example, if the subject is [3, 0], the match fails because the subject's type list is not the pattern's Point2d. As a third example, if the subject is Point2d(3, 7), the match fails because the subject's second coordinate 7 is not the same as the pattern's 0. The match statement trie...
...subject to yearly approval) "PyCon ZA", "PyCon South Africa" in South Africa "PyCon ZW", "PyCon Zimbabwe" in Zimbabwe If we have forgotten a national or regional PyCon conference in this list or have used the wrong naming, please write to the PSF trademark committee for approval. It is also possible to use a pycon.org sub-domain as home for the conference. Please write to webmaster at pycon.org to request a sub-domain.
...sub-domain by setting up their own name service for it and having esdotpycondotorg and any sub-domains resolve to whatever they setup on their servers. 9 Adjournment Marc-Andre Lemburg adjourned the meeting at 18:22 CEST/ 12:22 EDT.
...sub-nanosecond resolution can however extend Python for their needs. Such a rare use case doesn't justify to design the Python standard library to support sub-nanosecond resolution. For the CPython implementation, nanosecond resolution is convenient: the standard and well supported int64_t type can be used to store a nanosecond-precise timestamp. It supports a timespan of -292 years to +292 years. Using the UNIX epoch as reference, it therefore supports representing times since year 1677 to ye...
...sub-package "junk" of package "dummy" will be named "dummy.junk.spam" and, of course, the __init__ module of the same sub-package will have the logger name "dummy.junk". References [2]https://mail.python.org/pipermail/python-dev/2004-October/049282.html Copyright This document has been placed in the public domain. Source: https://github.com/python/peps/blob/master/pep-0337.txt
...sub-classes of RecursionError StackOverflow exception A StackOverflow exception will be raised whenever the interpreter or builtin module code determines that the C stack is at or nearing a limit of safety. StackOverflow is a sub-class of RecursionError, so any code that handles RecursionError will handle StackOverflow RecursionOverflow exception A RecursionOverflow exception will be raised when a call to a Python function causes the recursion limit to be exceeded. This is a slight change fro...
...sub-arrays iteration A computer animation is composed of a number of 2-D images or frames of identical shape. By stacking these images into a single block of memory, a 3-D array is created. Yet the operations to be performed are not meant for the entire 3-D array, but on the set of 2-D sub-arrays. In most array languages, each frame has to be extracted, operated on, and then reinserted into the output array using a for-like loop. The J language allows the programmer to perform such operation...
Version: None
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 …
View Release Notes
...subclass supporting the PDDM, may define a method called __datetime_add__ that should take two arguments--a datetime and a timedelta instances--and return a datetime instance. Subtraction of timedelta A tzinfo subclass supporting the PDDM, may define a method called __datetime_sub__ that should take two arguments--a datetime and a timedelta instances--and return a datetime instance. Formatting A tzinfo subclass supporting the PDDM, may define methods called __datetime_isoformat__ and __datet...
Released: Nov. 15, 2021
This is the ninth maintenance release of Python 3.9 Note: The release you're looking at is Python 3.9.9, an expedited 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. 3.9.9 was released …
...subproposal has been withdrawn in favour of better options, but is retained for reference. Making return-triggered StopIterations obvious For certain situations, a simpler and fully backward-compatible solution may be sufficient: when a generator returns, instead of raising StopIteration, it raises a specific subclass of StopIteration (GeneratorReturn) which can then be detected. If it is not that subclass, it is an escaping exception rather than a return statement. The inspiration for this al...
...Subscribe to the mailing list if you'd like to be updated on newly published security advisories. The mailing list has a public archive including all historical advisories sent to the list. There is also an advisory database published to GitHub using the Open Source Vulnerability (OSV) format which can be consumed using automated tooling. CVE Numbering Authority (CNA) contact If you need to contact the Python Software Foundation CNA directly, such as for updating or disputing a CVE record, you...
...subject" (the value after the match keyword), and checks it against the pattern (the code next to case). A pattern is able to do two different things: Verify that the subject has certain structure. In your case, the [action, obj] pattern matches any sequence of exactly two elements. This is called matching It will bind some names in the pattern to component elements of your subject. In this case, if the list has two elements, it will bind action = subject[0] and obj = subject[1]. If there's a ...
...subclass (or if a Py_mod_create slot is not present), the import machinery will associate the PyModuleDef with the module. This also makes the PyModuleDef accessible to execution phase, the PyModule_GetDef function, and garbage collection routines (traverse, clear, free). If the Py_mod_create function does not return a module subclass, then m_size must be 0, and m_traverse, m_clear and m_free must all be NULL. Otherwise, SystemError is raised. Additionally, initial attributes specified in the Py...
...sub-modules. The statement import os.path stores the module os locally as os, so that the imported submodule path is accessible as os.path. As a result, import os.path as p stores os.path, not os, in p. This makes it effectively the same as from os import path as p Implementation details This PEP has been accepted, and the suggested code change has been checked in. The patch can still be found in the SourceForge patch manager [1]. Currently, a NAME field is used in the grammar rathe...
...suboffsets address of a Py_ssize_t * variable that will be filled with a pointer to an array of Py_ssize_t of length *ndims. If these suboffset numbers are >=0, then the value stored along the indicated dimension is a pointer and the suboffset value dictates how many bytes to add to the pointer after de-referencing. A suboffset value that it negative indicates that no de-referencing should occur (striding in a contiguous memory block). If all suboffsets are negative (i.e. no de-referencing...