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.
...export groups. Each individual export group is then a mapping of arbitrary non-empty string keys to export specifiers. The meaning of export names within an export group is up to the distribution that defines the export group. Creating an appropriate definition for the export name format can allow the importing distribution to determine whether or not an export is relevant without needing to import every exporting module. Example: "exports": { "nose.plugins.0.10": { "chairtest": "chair:No...
...export_hook_name hook_name = export_hook_name(name) # call platform-specific function for loading exported function # from shared library exportfunc = _find_shared_funcptr(hook_name, path) m = exportfunc() if isinstance(m, PyModuleDef): def = m return PyModule_FromDefAndSpec(def, spec) module = m # fall back to single-phase initialization .... Objects/moduleobject.c: def PyModule_FromDefAndSpec(def, spec): name = spec.name creat...
...definition. Such a docstring becomes the __doc__ special attribute of that object. All modules should normally have docstrings, and all functions and classes exported by a module should also have docstrings. Public methods (including the __init__ constructor) should also have docstrings. A package may be documented in the module docstring of the __init__.py file in the package directory. String literals occurring elsewhere in Python code may also act as documentation. They are not recognized...
...definition, class definition, or method definition, after any comments. This is the standard for Python __doc__ attributes. Immediately following a simple assignment at the top level of a module, class definition, or __init__ method definition, after any comments. See Attribute Docstrings below. Additional string literals found immediately after the docstrings in (a) and (b) will be recognized, extracted, and concatenated. See Additional Docstrings below. @@@ 2.2-style "properties" with attri...
...definitions, a script to convert C source code containing type definitions will be provided [3]. References [1](1, 2) "python3 module definition file": http://svn.python.org/projects/python/branches/pep-0384/PC/python3.def [2]"PEP 384 branch": http://svn.python.org/projects/python/branches/pep-0384/ [3]"ABI type conversion script": http://svn.python.org/projects/python/branches/pep-0384/Tools/scripts/abitype.py Copyright This document has been placed in the public domain. So...
...definitions, but just one big technical change: the Stable ABI will be explicitly listed in a human-maintained “manifest” file. There have been efforts to collect such lists automatically, e.g. by scanning the symbols exported from Python. Such automation might seem easier to maintain than a handcrafted file, but has major issues: for example, the set exported symbols has platform-specific variations. Also, the cost of updating an explicit manifest is small compared to the overall work that shou...
...definitions else: # Python 2 specific definitions if sys.platform == 'win32': # Windows specific definitions else: # Posix specific definitions Don't expect a checker to understand obfuscations like "".join(reversed(sys.platform)) == "xunil". Runtime or type checking? Sometimes there's code that must be seen by a type checker (or other static analysis tools) but should not be executed. For such situations the typing module defines a constant, TYPE_CHECKING, that is considered Tr...
...export it. For modules that use log only in one class a logger can be created inside the class definition as follows: class XXX: __log = logging.getLogger('py.<module-name>') Then this class can create access methods to log to this private logger. So print and sys.std{out|err}.write statements should be replaced with _log.{debug|info}, and traceback.print_exception with _log.exception or sometimes _log.debug('...', exc_info=1). Module List Here is a (possibly incomplete) list of ...
...export various functions, classes, and other objects, but will perform additional activities (such as running unit tests) when run as a script. The current idiom is to test whether the module's name has been set to magic value. if __name__ == "__main__": ... More complicated introspection requires a module to (attempt to) import itself. If importing the expected name actually produces a different module, there is no good workaround. # __import__ lets you use a variable, but... it gets more ...
...definition as well. Option 4 There are a number of proposals to add a construct to the language that makes the concept of a value pre-computed at function definition time generally available, without tying it either to parameter default values or case expressions. Some keywords proposed include 'const', 'static', 'only' or 'cached'. The associated syntax and semantics vary. These proposals are out of scope for this PEP, except to suggest that if such a proposal is accepted, there are two way...
...Export its object structure declaration. Export a subtyping-aware type-checking macro. The requirements and signatures for tp_new(), tp_alloc() and tp_init() have already been discussed above: tp_alloc() should allocate the memory and initialize it to mostly zeros; tp_new() should call the tp_alloc() slot and then proceed to do the minimally required initialization; tp_init() should be used for more extensive initialization of mutable objects. It should come as no surprise that there are simila...
...export grade, Kerberos (KRB5), pre-shared key (PSK), secure remote transport (TLS-SRP), DSA cert (DSS) encryption: NULL, ARIA, DES, RC2, export grade 40bit PRF: MD5 SCSV cipher suites 3DES, RC4, SEED, and IDEA are included for legacy applications. Further more five additional cipher suites from the TLS 1.3 draft (draft-ietf-tls-tls13-18) are included, too. TLS 1.3 does not share any cipher suites with TLS 1.2 and earlier. The resulting enum will contain roughly 110 suites. Because of these limi...
...export data in an older version by choosing this option explicitly. In these cases, the forward-compatibility this enables may or may not be perfect; some features may be missing or the results may be otherwise suboptimal. Upgrading is therefore easy, whereas downgrading is harder. The emergent behaviour over many users from such a policy of new attractive features plus backward compatibility features is that a natural pressure builds up on each individual user to upgrade his or her own applicat...
...definitions for the benefit of redistributors that want to override those default settings. The locale coercion behaviour would be controlled by the flag --with[out]-c-locale-coercion, which would set the PY_COERCE_C_LOCALE preprocessor definition. The locale warning behaviour would be controlled by the flag --with[out]-c-locale-warning, which would set the PY_WARN_ON_C_LOCALE preprocessor definition. (Note: this compile time warning option ended up being replaced by a runtime PYTHONCOERCECLOCAL...
...definition overrides the dynamic definition, but for other attributes, dynamic overrides static. Rationale: we can't have a simple rule like "static overrides dynamic" or "dynamic overrides static", because some static attributes indeed override dynamic attributes; for example, a key '__class__' in an instance's __dict__ is ignored in favor of the statically defined __class__ pointer, but on the other hand most keys in inst.__dict__ override attributes defined in inst.__class__. Presence of a _...
...exportation of this info (Diana has provided Caktus with details/code for this deliverable) and getting the info to our designer. Financial Aid: Once the Financial Aid is finalized, I will be taking over to handle to housing. I will have to match up appropriate people based on their requests and dates. After that I will send out the room pairing info and how much PyCon is covering for their hotel stay to each recipient. I will then work with CTE to make sure that they send the appropriate info t...
...export support to a this PEP's lock file as "Poetry exports the information present in the poetry.lock file into another format" and sdists and source trees are included in Poetry.lock files. Thus it is not a clean translation from Poetry's lock file to this PEP's lock file format. Backwards Compatibility As there is no pre-existing specification regarding lock files, there are no explicit backwards compatibility concerns. As for pre-existing tools that have their own lock file, some updating ...
...export. Installable via pip3. "virtualenv". The release script installs Sphinx in a virtualenv when building the docs (for 2.7 and 3.5+). A fairly complete installation of a recent TeX distribution, such as texlive. You need that for building the PDF docs. Access to downloads.nyc1.psf.io, the server that hosts download files, and docs.nyc1.psf.io, the server that hosts the documentation. You'll be uploading files directly here. Administrator access to https://github.com/python/cpython. An ...
...exported when doing from poxixpath import *. It is also exported for ntpath, macpath, and os2emxpath. See SF bug #659228. New module tarfile from Lars Gustäbel provides a comprehensive interface to tar archive files with transparent gzip and bzip2 compression. See SF patch #651082. urlparse can now parse imap:// URLs. See SF feature request #618024. Tkinter.Canvas.scan_dragto() provides an optional parameter to support the gain value which is passed to Tk. SF bug# 602259. Fix logging.handlers....
...Exporting to sneakernet all code and data (previous TUF metadata and root keys) required to generate new keys and replace old ones Tightening the firewall, updating the entire operating system in order to fix security vulnerabilities, and airgapping the computer Exporting all new TUF metadata and keys to encrypted backup media. This backup provides a complete copy of the data required to restore the PyPI TUF repository Exporting only new TUF metadata and online keys to encrypted backup media. Th...