サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Switch 2
docs.python.org
What’s New In Python 3.13¶ Editors: Adam Turner and Thomas Wouters This article explains the new features in Python 3.13, compared to 3.12. Python 3.13 was released on October 7, 2024. For full details, see the changelog. Summary – Release Highlights¶ Python 3.13 is the latest stable release of the Python programming language, with a mix of changes to the language, the implementation and the stand
Note sys.monitoring is a namespace within the sys module, not an independent module, so there is no need to import sys.monitoring, simply import sys and then use sys.monitoring. This namespace provides access to the functions and constants necessary to activate and control event monitoring. As programs execute, events occur that might be of interest to tools that monitor execution. The sys.monitor
© Copyright 2001-2025, Python Software Foundation. This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License. See History and License for more information. The Python Software Foundation is a non-profit corporation. Please donate. Last updated on Jan 11, 2025 (11:4
Changelog¶ Python next¶ Release date: XXXX-XX-XX Windows¶ gh-127353: Allow to force color output on Windows using environment variables. Patch by Andrey Efremov. Tests¶ gh-127906: Test the limited C API in test_cppext. Patch by Victor Stinner. gh-127637: Add tests for the dis command-line interface. Patch by Bénédikt Tran. gh-126925: iOS test results are now streamed during test execution, and the
Command-Line Interface¶ When called as a program from the command line, the following form is used: If source is a directory, this will create an archive from the contents of source. If source is a file, it should be an archive, and it will be copied to the target archive (or the contents of its shebang line will be displayed if the –info option is specified). The following options are understood:
What’s New In Python 3.9¶ Editor: Łukasz Langa This article explains the new features in Python 3.9, compared to 3.8. Python 3.9 was released on October 5, 2020. For full details, see the changelog. Summary – Release highlights¶ New syntax features: PEP 584, union operators added to dict; PEP 585, type hinting generics in standard collections; PEP 614, relaxed grammar restrictions on decorators. N
heapq — Heap queue algorithm¶ Source code: Lib/heapq.py This module provides an implementation of the heap queue algorithm, also known as the priority queue algorithm. Heaps are binary trees for which every parent node has a value less than or equal to any of its children. We refer to this condition as the heap invariant. This implementation uses arrays for which heap[k] <= heap[2*k+1] and heap[k]
difflib — Helpers for computing deltas¶ Source code: Lib/difflib.py This module provides classes and functions for comparing sequences. It can be used for example, for comparing files, and can produce information about file differences in various formats, including HTML and context and unified diffs. For comparing directories and files, see also, the filecmp module. class difflib.SequenceMatcher T
secrets — Generate secure random numbers for managing secrets¶ Source code: Lib/secrets.py The secrets module is used for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets. In particular, secrets should be used in preference to the default pseudo-random number generator in the random module,
io — Core tools for working with streams¶ Source code: Lib/io.py Overview¶ The io module provides Python’s main facilities for dealing with various types of I/O. There are three main types of I/O: text I/O, binary I/O and raw I/O. These are generic categories, and various backing stores can be used for each of them. A concrete object belonging to any of these categories is called a file object. Ot
5. The import system¶ Python code in one module gains access to the code in another module by the process of importing it. The import statement is the most common way of invoking the import machinery, but it is not the only way. Functions such as importlib.import_module() and built-in __import__() can also be used to invoke the import machinery. The import statement combines two operations; it sea
dataclasses — Data Classes¶ Source code: Lib/dataclasses.py This module provides a decorator and functions for automatically adding generated special methods such as __init__() and __repr__() to user-defined classes. It was originally described in PEP 557. The member variables to use in these generated methods are defined using PEP 526 type annotations. For example, this code: from dataclasses imp
Initialization, Finalization, and Threads¶ See Python Initialization Configuration for details on how to configure the interpreter prior to initialization. Before Python Initialization¶ In an application embedding Python, the Py_Initialize() function must be called before using any other Python/C API functions; with the exception of a few functions and the global configuration variables. The follo
__main__ — Top-level code environment¶ In Python, the special name __main__ is used for two important constructs: the name of the top-level environment of the program, which can be checked using the __name__ == '__main__' expression; and the __main__.py file in Python packages. Both of these mechanisms are related to Python modules; how users interact with them and how they interact with each othe
What’s New In Python 3.8¶ Editor: Raymond Hettinger This article explains the new features in Python 3.8, compared to 3.7. Python 3.8 was released on October 14, 2019. For full details, see the changelog. Summary – Release highlights¶ New Features¶ Assignment expressions¶ There is new syntax := that assigns values to variables as part of a larger expression. It is affectionately known as “the walr
ipaddress — IPv4/IPv6 manipulation library¶ Source code: Lib/ipaddress.py ipaddress provides the capabilities to create, manipulate and operate on IPv4 and IPv6 addresses and networks. The functions and classes in this module make it straightforward to handle various tasks related to IP addresses, including checking whether or not two hosts are on the same subnet, iterating over all hosts in a par
keyword — Testing for Python keywords¶ Source code: Lib/keyword.py This module allows a Python program to determine if a string is a keyword or soft keyword. keyword.iskeyword(s)¶ Return True if s is a Python keyword. keyword.kwlist¶ Sequence containing all the keywords defined for the interpreter. If any keywords are defined to only be active when particular __future__ statements are in effect, t
gzip — Support for gzip files¶ Source code: Lib/gzip.py This module provides a simple interface to compress and decompress files just like the GNU programs gzip and gunzip would. The data compression is provided by the zlib module. The gzip module provides the GzipFile class, as well as the open(), compress() and decompress() convenience functions. The GzipFile class reads and writes gzip-format f
ssl — TLS/SSL wrapper for socket objects¶ Source code: Lib/ssl.py This module provides access to Transport Layer Security (often known as “Secure Sockets Layer”) encryption and peer authentication facilities for network sockets, both client-side and server-side. This module uses the OpenSSL library. It is available on all modern Unix systems, Windows, macOS, and probably additional platforms, as l
tempfile — Generate temporary files and directories¶ Source code: Lib/tempfile.py This module creates temporary files and directories. It works on all supported platforms. TemporaryFile, NamedTemporaryFile, TemporaryDirectory, and SpooledTemporaryFile are high-level interfaces which provide automatic cleanup and can be used as context managers. mkstemp() and mkdtemp() are lower-level functions whi
12. Virtual Environments and Packages¶ 12.1. Introduction¶ Python applications will often use packages and modules that don’t come as part of the standard library. Applications will sometimes need a specific version of a library, because the application may require that a particular bug has been fixed or the application may be written using an obsolete version of the library’s interface. This mean
Instrumenting CPython with DTrace and SystemTap¶ author: David Malcolm author: Łukasz Langa DTrace and SystemTap are monitoring tools, each providing a way to inspect what the processes on a computer system are doing. They both use domain-specific languages allowing a user to write scripts which: filter which processes are to be observed gather data from the processes of interest generate reports
1. Extending Python with C or C++¶ It is quite easy to add new built-in modules to Python, if you know how to program in C. Such extension modules can do two things that can’t be done directly in Python: they can implement new built-in object types, and they can call C library functions and system calls. To support extensions, the Python API (Application Programmers Interface) defines a set of fun
What’s New In Python 3.7¶ Editor: Elvis Pranskevichus <elvis@magic.io> This article explains the new features in Python 3.7, compared to 3.6. Python 3.7 was released on June 27, 2018. For full details, see the changelog. Summary – Release Highlights¶ New syntax features: PEP 563, postponed evaluation of type annotations. Backwards incompatible syntax changes: async and await are now reserved keywo
threading — Thread-based parallelism¶ Source code: Lib/threading.py This module constructs higher-level threading interfaces on top of the lower level _thread module. Changed in version 3.7: This module used to be optional, it is now always available. See also concurrent.futures.ThreadPoolExecutor offers a higher level interface to push tasks to a background thread without blocking execution of th
cmd — Support for line-oriented command interpreters¶ Source code: Lib/cmd.py The Cmd class provides a simple framework for writing line-oriented command interpreters. These are often useful for test harnesses, administrative tools, and prototypes that will later be wrapped in a more sophisticated interface. class cmd.Cmd(completekey='tab', stdin=None, stdout=None)¶ A Cmd instance or subclass inst
bisect — Array bisection algorithm¶ Source code: Lib/bisect.py This module provides support for maintaining a list in sorted order without having to sort the list after each insertion. For long lists of items with expensive comparison operations, this can be an improvement over linear searches or frequent resorting. The module is called bisect because it uses a basic bisection algorithm to do its
Source code: Lib/tracemalloc.py The tracemalloc module is a debug tool to trace memory blocks allocated by Python. It provides the following information: Traceback where an object was allocated Statistics on allocated memory blocks per filename and per line number: total size, number and average size of allocated memory blocks Compute the differences between two snapshots to detect memory leaks To
logging.handlers — Logging handlers¶ Source code: Lib/logging/handlers.py The following useful handlers are provided in the package. Note that three of the handlers (StreamHandler, FileHandler and NullHandler) are actually defined in the logging module itself, but have been documented here along with the other handlers. StreamHandler¶ The StreamHandler class, located in the core logging package, s
次のページ
このページを最初にブックマークしてみませんか?
『3.12.6 Documentation』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く