Buffer Protocol
---------------
-.. sectionauthor:: Greg Stein <gstein@lyra.org>
-.. sectionauthor:: Benjamin Peterson
-.. sectionauthor:: Stefan Krah
-
-
Certain objects available in Python wrap access to an underlying memory
array or *buffer*. Such objects include the built-in :class:`bytes` and
:class:`bytearray`, and some extension types like :class:`array.array`.
Code Objects
------------
-.. sectionauthor:: Jeffrey Yasskin <jyasskin@gmail.com>
-
Code objects are a low-level detail of the CPython implementation.
Each one represents a chunk of executable code that hasn't yet been
bound into a function.
Profiling and Tracing
=====================
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
-
The Python interpreter provides some low-level support for attaching profiling
and execution tracing facilities. These are used for profiling, debugging, and
coverage analysis tools.
Advanced Debugger Support
=========================
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
-
These functions are only intended to be used by advanced debugging tools.
Thread Local Storage Support
============================
-.. sectionauthor:: Masayuki Yamamoto <ma3yuki.8mamo10@gmail.com>
-
The Python interpreter provides low-level support for thread-local storage
(TLS) which wraps the underlying native TLS implementation to support the
Python-level thread local storage API (:class:`threading.local`). The
Memory Management
*****************
-.. sectionauthor:: Vladimir Marangozov <Vladimir.Marangozov@inrialpes.fr>
-
-
-
.. _memoryoverview:
Overview
Set Objects
-----------
-.. sectionauthor:: Raymond D. Hettinger <python@rcn.com>
-
-
.. index::
pair: object; set
pair: object; frozenset
Number Object Structures
------------------------
-.. sectionauthor:: Amaury Forgeot d'Arc
-
-
.. c:type:: PyNumberMethods
This structure holds pointers to the functions which an object uses to
Mapping Object Structures
-------------------------
-.. sectionauthor:: Amaury Forgeot d'Arc
-
-
.. c:type:: PyMappingMethods
This structure holds pointers to the functions which an object uses to
Sequence Object Structures
--------------------------
-.. sectionauthor:: Amaury Forgeot d'Arc
-
-
.. c:type:: PySequenceMethods
This structure holds pointers to the functions which an object uses to
Buffer Object Structures
------------------------
-.. sectionauthor:: Greg J. Stein <greg@lyra.org>
-.. sectionauthor:: Benjamin Peterson
-.. sectionauthor:: Stefan Krah
-
.. c:type:: PyBufferProcs
This structure holds pointers to the functions required by the
Async Object Structures
-----------------------
-.. sectionauthor:: Yury Selivanov <yselivanov@sprymix.com>
-
.. versionadded:: 3.5
.. c:type:: PyAsyncMethods
Unicode Objects and Codecs
--------------------------
-.. sectionauthor:: Marc-André Lemburg <mal@lemburg.com>
-.. sectionauthor:: Georg Brandl <georg@python.org>
-
Unicode Objects
^^^^^^^^^^^^^^^
Providing a C API for an Extension Module
=========================================
-.. sectionauthor:: Konrad Hinsen <hinsen@cnrs-orleans.fr>
-
-
Many extension modules just provide new functions and types to be used from
Python, but sometimes the code in an extension module can be useful for other
extension modules. For example, an extension module could implement a type
Defining Extension Types: Tutorial
**********************************
-.. sectionauthor:: Michael Hudson <mwh@python.net>
-.. sectionauthor:: Dave Kuhlman <dkuhlman@rexx.com>
-.. sectionauthor:: Jim Fulton <jim@zope.com>
-
-
Python allows the writer of a C extension module to define new types that
can be manipulated from Python code, much like the built-in :class:`str`
and :class:`list` types. The code for all extension types follows a
Differences Between Unix and Windows
====================================
-.. sectionauthor:: Chris Phoenix <cphoenix@best.com>
-
-
Unix and Windows use completely different paradigms for run-time loading of
code. Before you try to build a module that can be dynamically loaded, be aware
of how your system works.
Using DLLs in Practice
======================
-.. sectionauthor:: Chris Phoenix <cphoenix@best.com>
-
-
Windows Python is built in Microsoft Visual C++; using other compilers may or
may not work. The rest of this section is MSVC++ specific.
Using file rotation
-------------------
-.. sectionauthor:: Doug Hellmann, Vinay Sajip (changes)
-.. (see <https://pymotw.com/3/logging/>)
-
Sometimes you want to let a log file grow to a certain size, then open a new
file and log to that. You may want to keep a certain number of these files, and
when that many files have been created, rotate the files so that the number of
.. module:: abc
:synopsis: Abstract base classes according to :pep:`3119`.
-.. moduleauthor:: Guido van Rossum
-.. sectionauthor:: Georg Brandl
-.. much of the content adapted from docstrings
-
**Source code:** :source:`Lib/abc.py`
--------------
.. module:: argparse
:synopsis: Command-line option and argument parsing library.
-.. moduleauthor:: Steven Bethard <steven.bethard@gmail.com>
-.. sectionauthor:: Steven Bethard <steven.bethard@gmail.com>
-
.. versionadded:: 3.2
**Source code:** :source:`Lib/argparse.py`
.. module:: ast
:synopsis: Abstract Syntax Tree classes and manipulation.
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-.. sectionauthor:: Georg Brandl <georg@python.org>
-
.. testsetup::
import ast
.. module:: atexit
:synopsis: Register and execute cleanup functions.
-.. moduleauthor:: Skip Montanaro <skip.montanaro@gmail.com>
-.. sectionauthor:: Skip Montanaro <skip.montanaro@gmail.com>
-
--------------
The :mod:`!atexit` module defines functions to register and unregister cleanup
.. module:: bisect
:synopsis: Array bisection algorithms for binary searching.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-.. sectionauthor:: Raymond Hettinger <python at rcn.com>
-.. example based on the PyModules FAQ entry by Aaron Watters <arw@pythonpros.com>
**Source code:** :source:`Lib/bisect.py`
.. module:: bz2
:synopsis: Interfaces for bzip2 compression and decompression.
-.. moduleauthor:: Gustavo Niemeyer <niemeyer@conectiva.com>
-.. moduleauthor:: Nadeem Vawda <nadeem.vawda@gmail.com>
-.. sectionauthor:: Gustavo Niemeyer <niemeyer@conectiva.com>
-.. sectionauthor:: Nadeem Vawda <nadeem.vawda@gmail.com>
-
**Source code:** :source:`Lib/bz2.py`
--------------
:synopsis: Functions for working with calendars, including some emulation
of the Unix cal program.
-.. sectionauthor:: Drew Csillag <drew_csillag@geocities.com>
-
**Source code:** :source:`Lib/calendar.py`
--------------
.. module:: cmd
:synopsis: Build line-oriented command interpreters.
-.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
-
**Source code:** :source:`Lib/cmd.py`
--------------
Cmd Example
-----------
-.. sectionauthor:: Raymond Hettinger <python at rcn dot com>
-
The :mod:`!cmd` module is mainly useful for building custom shells that let a
user work with a program interactively.
.. module:: codecs
:synopsis: Encode and decode data and streams.
-.. moduleauthor:: Marc-André Lemburg <mal@lemburg.com>
-.. sectionauthor:: Marc-André Lemburg <mal@lemburg.com>
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
**Source code:** :source:`Lib/codecs.py`
.. index::
.. module:: encodings.idna
:synopsis: Internationalized Domain Names implementation
-.. moduleauthor:: Martin v. Löwis
This module implements :rfc:`3490` (Internationalized Domain Names in
Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for
.. module:: encodings.utf_8_sig
:synopsis: UTF-8 codec with BOM signature
-.. moduleauthor:: Walter Dörwald
This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 encoded
BOM will be prepended to the UTF-8 encoded bytes. For the stateful encoder this
.. module:: codeop
:synopsis: Compile (possibly incomplete) Python code.
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-.. sectionauthor:: Michael Hudson <mwh@python.net>
-
**Source code:** :source:`Lib/codeop.py`
--------------
.. module:: collections.abc
:synopsis: Abstract base classes for containers
-.. moduleauthor:: Raymond Hettinger <python at rcn.com>
-.. sectionauthor:: Raymond Hettinger <python at rcn.com>
-
.. versionadded:: 3.3
Formerly, this module was part of the :mod:`collections` module.
.. module:: collections
:synopsis: Container datatypes
-.. moduleauthor:: Raymond Hettinger <python@rcn.com>
-.. sectionauthor:: Raymond Hettinger <python@rcn.com>
-
**Source code:** :source:`Lib/collections/__init__.py`
.. testsetup:: *
.. module:: colorsys
:synopsis: Conversion functions between RGB and other color systems.
-.. sectionauthor:: David Ascher <da@python.net>
-
**Source code:** :source:`Lib/colorsys.py`
--------------
.. module:: concurrent.interpreters
:synopsis: Multiple interpreters in the same process
-.. moduleauthor:: Eric Snow <ericsnowcurrently@gmail.com>
-.. sectionauthor:: Eric Snow <ericsnowcurrently@gmail.com>
-
.. versionadded:: 3.14
**Source code:** :source:`Lib/concurrent/interpreters`
.. module:: configparser
:synopsis: Configuration file parser.
-.. moduleauthor:: Ken Manheimer <klm@zope.com>
-.. moduleauthor:: Barry Warsaw <bwarsaw@python.org>
-.. moduleauthor:: Eric S. Raymond <esr@thyrsus.com>
-.. moduleauthor:: Łukasz Langa <lukasz@langa.pl>
-.. sectionauthor:: Christopher G. Petrilli <petrilli@amber.org>
-.. sectionauthor:: Łukasz Langa <lukasz@langa.pl>
-
**Source code:** :source:`Lib/configparser.py`
.. index::
.. module:: contextvars
:synopsis: Context Variables
-.. sectionauthor:: Yury Selivanov <yury@magic.io>
-
--------------
This module provides APIs to manage, store, and access context-local
.. module:: csv
:synopsis: Write and read tabular data to and from delimited files.
-.. sectionauthor:: Skip Montanaro <skip.montanaro@gmail.com>
-
**Source code:** :source:`Lib/csv.py`
.. index::
.. module:: ctypes
:synopsis: A foreign function library for Python.
-.. moduleauthor:: Thomas Heller <theller@python.net>
-
**Source code:** :source:`Lib/ctypes`
--------------
.. module:: curses.ascii
:synopsis: Constants and set-membership functions for ASCII characters.
-.. moduleauthor:: Eric S. Raymond <esr@thyrsus.com>
-.. sectionauthor:: Eric S. Raymond <esr@thyrsus.com>
-
**Source code:** :source:`Lib/curses/ascii.py`
--------------
.. module:: curses.panel
:synopsis: A panel stack extension that adds depth to curses windows.
-.. sectionauthor:: A.M. Kuchling <amk@amk.ca>
-
--------------
Panels are windows with the added feature of depth, so they can be stacked on
:synopsis: An interface to the curses library, providing portable
terminal handling.
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-.. sectionauthor:: Eric Raymond <esr@thyrsus.com>
-
**Source code:** :source:`Lib/curses`
--------------
.. module:: curses.textpad
:synopsis: Emacs-like input editing in a curses window.
-.. moduleauthor:: Eric Raymond <esr@thyrsus.com>
-.. sectionauthor:: Eric Raymond <esr@thyrsus.com>
-
The :mod:`!curses.textpad` module provides a :class:`Textbox` class that handles
elementary text editing in a curses window, supporting a set of keybindings
.. module:: dataclasses
:synopsis: Generate special methods on user-defined classes.
-.. moduleauthor:: Eric V. Smith <eric@trueblade.com>
-.. sectionauthor:: Eric V. Smith <eric@trueblade.com>
-
**Source code:** :source:`Lib/dataclasses.py`
--------------
.. module:: datetime
:synopsis: Basic date and time types.
-.. moduleauthor:: Tim Peters <tim@zope.com>
-.. sectionauthor:: Tim Peters <tim@zope.com>
-.. sectionauthor:: A.M. Kuchling <amk@amk.ca>
-
**Source code:** :source:`Lib/datetime.py`
--------------
.. module:: decimal
:synopsis: Implementation of the General Decimal Arithmetic Specification.
-.. moduleauthor:: Eric Price <eprice at tjhsst.edu>
-.. moduleauthor:: Facundo Batista <facundo at taniquetil.com.ar>
-.. moduleauthor:: Raymond Hettinger <python at rcn.com>
-.. moduleauthor:: Aahz <aahz at pobox.com>
-.. moduleauthor:: Tim Peters <tim.one at comcast.net>
-.. moduleauthor:: Stefan Krah <skrah at bytereef.org>
-.. sectionauthor:: Raymond D. Hettinger <python at rcn.com>
-
**Source code:** :source:`Lib/decimal.py`
.. import modules for testing inline doctests with the Sphinx doctest builder
.. module:: difflib
:synopsis: Helpers for computing differences between objects.
-.. moduleauthor:: Tim Peters <tim_one@users.sourceforge.net>
-.. sectionauthor:: Tim Peters <tim_one@users.sourceforge.net>
-.. Markup by Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/difflib.py`
.. testsetup::
.. module:: doctest
:synopsis: Test pieces of code within docstrings.
-.. moduleauthor:: Tim Peters <tim@python.org>
-.. sectionauthor:: Tim Peters <tim@python.org>
-.. sectionauthor:: Moshe Zadka <moshez@debian.org>
-.. sectionauthor:: Edward Loper <edloper@users.sourceforge.net>
-
**Source code:** :source:`Lib/doctest.py`
--------------
.. module:: email.contentmanager
:synopsis: Storing and Retrieving Content from MIME Parts
-.. moduleauthor:: R. David Murray <rdmurray@bitdance.com>
-.. sectionauthor:: R. David Murray <rdmurray@bitdance.com>
-
**Source code:** :source:`Lib/email/contentmanager.py`
------------
.. module:: email.headerregistry
:synopsis: Automatic Parsing of headers based on the field name
-.. moduleauthor:: R. David Murray <rdmurray@bitdance.com>
-.. sectionauthor:: R. David Murray <rdmurray@bitdance.com>
-
**Source code:** :source:`Lib/email/headerregistry.py`
--------------
.. module:: email.message
:synopsis: The base class representing email messages.
-.. moduleauthor:: R. David Murray <rdmurray@bitdance.com>
-.. sectionauthor:: R. David Murray <rdmurray@bitdance.com>,
- Barry A. Warsaw <barry@python.org>
**Source code:** :source:`Lib/email/message.py`
.. module:: email.policy
:synopsis: Controlling the parsing and generating of messages
-.. moduleauthor:: R. David Murray <rdmurray@bitdance.com>
-.. sectionauthor:: R. David Murray <rdmurray@bitdance.com>
-
.. versionadded:: 3.3
**Source code:** :source:`Lib/email/policy.py`
.. module:: email
:synopsis: Package supporting the parsing, manipulating, and generating
email messages.
-.. moduleauthor:: Barry A. Warsaw <barry@python.org>,
- R. David Murray <rdmurray@bitdance.com>
-.. sectionauthor:: R. David Murray <rdmurray@bitdance.com>
**Source code:** :source:`Lib/email/__init__.py`
.. module:: enum
:synopsis: Implementation of an enumeration class.
-.. moduleauthor:: Ethan Furman <ethan@stoneleaf.us>
-.. sectionauthor:: Barry Warsaw <barry@python.org>
-.. sectionauthor:: Eli Bendersky <eliben@gmail.com>
-.. sectionauthor:: Ethan Furman <ethan@stoneleaf.us>
-
.. versionadded:: 3.4
**Source code:** :source:`Lib/enum.py`
.. module:: fcntl
:synopsis: The fcntl() and ioctl() system calls.
-.. sectionauthor:: Jaap Vermeulen
-
.. index::
pair: UNIX; file control
pair: UNIX; I/O control
.. module:: filecmp
:synopsis: Compare files efficiently.
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-
**Source code:** :source:`Lib/filecmp.py`
--------------
.. module:: fileinput
:synopsis: Loop over standard input or a list of files.
-.. moduleauthor:: Guido van Rossum <guido@python.org>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/fileinput.py`
--------------
.. module:: fractions
:synopsis: Rational numbers.
-.. moduleauthor:: Jeffrey Yasskin <jyasskin at gmail.com>
-.. sectionauthor:: Jeffrey Yasskin <jyasskin at gmail.com>
-
**Source code:** :source:`Lib/fractions.py`
--------------
.. module:: functools
:synopsis: Higher-order functions and operations on callable objects.
-.. moduleauthor:: Peter Harris <scav@blueyonder.co.uk>
-.. moduleauthor:: Raymond Hettinger <python@rcn.com>
-.. moduleauthor:: Nick Coghlan <ncoghlan@gmail.com>
-.. moduleauthor:: Łukasz Langa <lukasz@langa.pl>
-.. moduleauthor:: Pablo Galindo <pablogsal@gmail.com>
-.. sectionauthor:: Peter Harris <scav@blueyonder.co.uk>
-
**Source code:** :source:`Lib/functools.py`
.. testsetup:: default
.. module:: gc
:synopsis: Interface to the cycle-detecting garbage collector.
-.. moduleauthor:: Neil Schemenauer <nas@arctrix.com>
-.. sectionauthor:: Neil Schemenauer <nas@arctrix.com>
-
--------------
This module provides an interface to the optional garbage collector. It
.. module:: getpass
:synopsis: Portable reading of passwords and retrieval of the userid.
-.. moduleauthor:: Piers Lauder <piers@cs.su.oz.au>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-.. Windows (& Mac?) support by Guido van Rossum.
-
**Source code:** :source:`Lib/getpass.py`
--------------
.. module:: gettext
:synopsis: Multilingual internationalization services.
-.. moduleauthor:: Barry A. Warsaw <barry@python.org>
-.. sectionauthor:: Barry A. Warsaw <barry@python.org>
-
**Source code:** :source:`Lib/gettext.py`
--------------
.. module:: hashlib
:synopsis: Secure hash and message digest algorithms.
-.. moduleauthor:: Gregory P. Smith <greg@krypto.org>
-.. sectionauthor:: Gregory P. Smith <greg@krypto.org>
-
**Source code:** :source:`Lib/hashlib.py`
.. index::
BLAKE2
------
-.. sectionauthor:: Dmitry Chestnykh
-
.. index::
single: blake2b, blake2s
.. module:: heapq
:synopsis: Heap queue algorithm (a.k.a. priority queue).
-.. moduleauthor:: Kevin O'Connor
-.. sectionauthor:: Guido van Rossum <guido@python.org>
-.. sectionauthor:: François Pinard
-.. sectionauthor:: Raymond Hettinger
-
**Source code:** :source:`Lib/heapq.py`
--------------
.. module:: hmac
:synopsis: Keyed-Hashing for Message Authentication (HMAC) implementation
-.. moduleauthor:: Gerhard Häring <ghaering@users.sourceforge.net>
-.. sectionauthor:: Gerhard Häring <ghaering@users.sourceforge.net>
-
**Source code:** :source:`Lib/hmac.py`
--------------
.. module:: html.entities
:synopsis: Definitions of HTML general entities.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/html/entities.py`
--------------
.. module:: http.cookiejar
:synopsis: Classes for automatic handling of HTTP cookies.
-.. moduleauthor:: John J. Lee <jjl@pobox.com>
-.. sectionauthor:: John J. Lee <jjl@pobox.com>
-
**Source code:** :source:`Lib/http/cookiejar.py`
--------------
.. module:: http.cookies
:synopsis: Support for HTTP state management (cookies).
-.. moduleauthor:: Timothy O'Malley <timo@alum.mit.edu>
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-
**Source code:** :source:`Lib/http/cookies.py`
--------------
IDLE --- Python editor and shell
================================
-.. moduleauthor:: Guido van Rossum <guido@python.org>
-
**Source code:** :source:`Lib/idlelib/`
.. index::
.. module:: imaplib
:synopsis: IMAP4 protocol client (requires sockets).
-.. moduleauthor:: Piers Lauder <piers@communitysolutions.com.au>
-.. sectionauthor:: Piers Lauder <piers@communitysolutions.com.au>
-.. revised by ESR, January 2000
-.. changes for IMAP4_SSL by Tino Lange <Tino.Lange@isg.de>, March 2002
-.. changes for IMAP4_stream by Piers Lauder <piers@communitysolutions.com.au>,
- November 2002
-.. changes for IMAP4 IDLE by Forest <forestix@nom.one>, August 2024
-
**Source code:** :source:`Lib/imaplib.py`
.. index::
.. module:: importlib
:synopsis: The implementation of the import machinery.
-.. moduleauthor:: Brett Cannon <brett@python.org>
-.. sectionauthor:: Brett Cannon <brett@python.org>
-
.. versionadded:: 3.1
**Source code:** :source:`Lib/importlib/__init__.py`
.. module:: inspect
:synopsis: Extract information and source code from live objects.
-.. moduleauthor:: Ka-Ping Yee <ping@lfw.org>
-.. sectionauthor:: Ka-Ping Yee <ping@lfw.org>
-
**Source code:** :source:`Lib/inspect.py`
--------------
.. module:: io
:synopsis: Core tools for working with streams.
-.. moduleauthor:: Guido van Rossum <guido@python.org>
-.. moduleauthor:: Mike Verdone <mike.verdone@gmail.com>
-.. moduleauthor:: Mark Russell <mark.russell@zen.co.uk>
-.. moduleauthor:: Antoine Pitrou <solipsis@pitrou.net>
-.. moduleauthor:: Amaury Forgeot d'Arc <amauryfa@gmail.com>
-.. moduleauthor:: Benjamin Peterson <benjamin@python.org>
-.. sectionauthor:: Benjamin Peterson <benjamin@python.org>
-
**Source code:** :source:`Lib/io.py`
--------------
.. module:: ipaddress
:synopsis: IPv4/IPv6 manipulation library.
-.. moduleauthor:: Peter Moody
-
**Source code:** :source:`Lib/ipaddress.py`
--------------
.. module:: itertools
:synopsis: Functions creating iterators for efficient looping.
-.. moduleauthor:: Raymond Hettinger <python@rcn.com>
-.. sectionauthor:: Raymond Hettinger <python@rcn.com>
-
.. testsetup::
from itertools import *
.. module:: json
:synopsis: Encode and decode the JSON format.
-.. moduleauthor:: Bob Ippolito <bob@redivi.com>
-.. sectionauthor:: Bob Ippolito <bob@redivi.com>
-
**Source code:** :source:`Lib/json/__init__.py`
--------------
.. module:: linecache
:synopsis: Provides random access to individual lines from text files.
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-
**Source code:** :source:`Lib/linecache.py`
--------------
.. module:: locale
:synopsis: Internationalization services.
-.. moduleauthor:: Martin von Löwis <martin@v.loewis.de>
-.. sectionauthor:: Martin von Löwis <martin@v.loewis.de>
-
**Source code:** :source:`Lib/locale.py`
--------------
.. module:: logging.config
:synopsis: Configuration of the logging module.
-.. moduleauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
-.. sectionauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
-
**Source code:** :source:`Lib/logging/config.py`
.. sidebar:: Important
.. module:: logging.handlers
:synopsis: Handlers for the logging module.
-.. moduleauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
-.. sectionauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
-
**Source code:** :source:`Lib/logging/handlers.py`
.. sidebar:: Important
.. module:: logging
:synopsis: Flexible event logging system for applications.
-.. moduleauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
-.. sectionauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
-
**Source code:** :source:`Lib/logging/__init__.py`
.. index:: pair: Errors; logging
.. module:: lzma
:synopsis: A Python wrapper for the liblzma compression library.
-.. moduleauthor:: Nadeem Vawda <nadeem.vawda@gmail.com>
-.. sectionauthor:: Nadeem Vawda <nadeem.vawda@gmail.com>
-
.. versionadded:: 3.3
**Source code:** :source:`Lib/lzma.py`
.. module:: mailbox
:synopsis: Manipulate mailboxes in various formats
-.. moduleauthor:: Gregory K. Johnson <gkj@gregorykjohnson.com>
-.. sectionauthor:: Gregory K. Johnson <gkj@gregorykjohnson.com>
-
**Source code:** :source:`Lib/mailbox.py`
--------------
.. module:: mimetypes
:synopsis: Mapping of filename extensions to MIME types.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/mimetypes.py`
.. index:: pair: MIME; content type
.. module:: modulefinder
:synopsis: Find modules used by a script.
-.. sectionauthor:: A.M. Kuchling <amk@amk.ca>
-
**Source code:** :source:`Lib/modulefinder.py`
--------------
.. module:: msvcrt
:synopsis: Miscellaneous useful routines from the MS VC++ runtime.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`PC/msvcrtmodule.c`
--------------
.. module:: netrc
:synopsis: Loading of .netrc files.
-.. moduleauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
-.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
-
**Source code:** :source:`Lib/netrc.py`
--------------
.. module:: operator
:synopsis: Functions corresponding to the standard operators.
-.. sectionauthor:: Skip Montanaro <skip@automatrix.com>
-
**Source code:** :source:`Lib/operator.py`
.. testsetup::
.. module:: optparse
:synopsis: Command-line option parsing library.
-.. moduleauthor:: Greg Ward <gward@python.net>
-.. sectionauthor:: Greg Ward <gward@python.net>
-
**Source code:** :source:`Lib/optparse.py`
--------------
.. module:: pickle
:synopsis: Convert Python objects to streams of bytes and back.
-.. sectionauthor:: Jim Kerr <jbkerr@sr.hp.com>.
-.. sectionauthor:: Barry Warsaw <barry@python.org>
-
**Source code:** :source:`Lib/pickle.py`
.. index::
.. module:: platform
:synopsis: Retrieves as much platform identifying data as possible.
-.. moduleauthor:: Marc-André Lemburg <mal@egenix.com>
-.. sectionauthor:: Bjorn Pettersen <bpettersen@corp.fairisaac.com>
-
**Source code:** :source:`Lib/platform.py`
--------------
.. module:: plistlib
:synopsis: Generate and parse Apple plist files.
-.. moduleauthor:: Jack Jansen
-.. sectionauthor:: Georg Brandl <georg@python.org>
-.. (harvested from docstrings in the original file)
-
**Source code:** :source:`Lib/plistlib.py`
.. index::
.. module:: poplib
:synopsis: POP3 protocol client (requires sockets).
-.. sectionauthor:: Andrew T. Csillag
-.. revised by ESR, January 2000
-
**Source code:** :source:`Lib/poplib.py`
.. index:: pair: POP3; protocol
single: large files
single: file; large files
-.. sectionauthor:: Steve Clift <clift@mail.anacapa.net>
-
Several operating systems (including AIX and Solaris) provide
support for files that are larger than 2 GiB from a C programming model where
:c:expr:`int` and :c:expr:`long` are 32-bit values. This is typically accomplished
.. module:: pprint
:synopsis: Data pretty printer.
-.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/pprint.py`
--------------
.. module:: pty
:synopsis: Pseudo-Terminal Handling for Unix.
-.. moduleauthor:: Steen Lumholt
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-
**Source code:** :source:`Lib/pty.py`
--------------
Example
-------
-.. sectionauthor:: Steen Lumholt
-
The following program acts like the Unix command :manpage:`script(1)`, using a
pseudo-terminal to record all input and output of a terminal session in a
"typescript". ::
.. module:: py_compile
:synopsis: Generate byte-code files from Python source files.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-.. documentation based on module docstrings
-
**Source code:** :source:`Lib/py_compile.py`
.. index:: pair: file; byte-code
.. module:: pyclbr
:synopsis: Supports information extraction for a Python module browser.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/pyclbr.py`
--------------
.. module:: pydoc
:synopsis: Documentation generator and online help system.
-.. moduleauthor:: Ka-Ping Yee <ping@lfw.org>
-.. sectionauthor:: Ka-Ping Yee <ping@lfw.org>
-
**Source code:** :source:`Lib/pydoc.py`
.. index::
.. module:: xml.parsers.expat
:synopsis: An interface to the Expat non-validating XML parser.
-.. moduleauthor:: Paul Prescod <paul@prescod.net>
-
--------------
.. Markup notes:
ExpatError Exceptions
---------------------
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
-
:exc:`ExpatError` exceptions have a number of interesting attributes:
.. module:: xml.parsers.expat.model
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
Content models are described using nested tuples. Each tuple contains four
values: the type, the quantifier, the name, and a tuple of children. Children
are simply additional content model descriptions.
.. module:: re
:synopsis: Regular expression operations.
-.. moduleauthor:: Fredrik Lundh <fredrik@pythonware.com>
-.. sectionauthor:: Andrew M. Kuchling <amk@amk.ca>
-
**Source code:** :source:`Lib/re/`
--------------
search() vs. prefixmatch()
^^^^^^^^^^^^^^^^^^^^^^^^^^
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
Python offers different primitive operations based on regular expressions:
+ :func:`re.prefixmatch` checks for a match only at the beginning of the string
.. module:: readline
:synopsis: GNU readline support for Python.
-.. sectionauthor:: Skip Montanaro <skip.montanaro@gmail.com>
-
--------------
The :mod:`!readline` module defines a number of functions to facilitate
.. module:: reprlib
:synopsis: Alternate repr() implementation with size limits.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/reprlib.py`
--------------
.. module:: resource
:synopsis: An interface to provide resource usage information on the current process.
-.. moduleauthor:: Jeremy Hylton <jeremy@alum.mit.edu>
-.. sectionauthor:: Jeremy Hylton <jeremy@alum.mit.edu>
-
--------------
This module provides basic mechanisms for measuring and controlling system
.. module:: rlcompleter
:synopsis: Python identifier completion, suitable for the GNU readline library.
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-
**Source code:** :source:`Lib/rlcompleter.py`
--------------
.. module:: runpy
:synopsis: Locate and run Python modules without importing them first.
-.. moduleauthor:: Nick Coghlan <ncoghlan@gmail.com>
-
**Source code:** :source:`Lib/runpy.py`
--------------
.. module:: sched
:synopsis: General purpose event scheduler.
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-
**Source code:** :source:`Lib/sched.py`
.. index:: single: event scheduling
.. module:: secrets
:synopsis: Generate secure random numbers for managing secrets.
-.. moduleauthor:: Steven D'Aprano <steve+python@pearwood.info>
-.. sectionauthor:: Steven D'Aprano <steve+python@pearwood.info>
.. versionadded:: 3.6
.. testsetup::
.. module:: shlex
:synopsis: Simple lexical analysis for Unix shell-like languages.
-.. moduleauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
-.. moduleauthor:: Gustavo Niemeyer <niemeyer@conectiva.com>
-.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
-.. sectionauthor:: Gustavo Niemeyer <niemeyer@conectiva.com>
-
**Source code:** :source:`Lib/shlex.py`
--------------
.. module:: shutil
:synopsis: High-level file operations, including copying.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-.. partly based on the docstrings
-
**Source code:** :source:`Lib/shutil.py`
.. index::
.. module:: smtplib
:synopsis: SMTP protocol client (requires sockets).
-.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
-
**Source code:** :source:`Lib/smtplib.py`
.. index::
.. module:: sqlite3
:synopsis: A DB-API 2.0 implementation using SQLite 3.x.
-.. sectionauthor:: Gerhard Häring <gh@ghaering.de>
-
**Source code:** :source:`Lib/sqlite3/`
.. Make sure we always doctest the tutorial with an empty database.
.. module:: ssl
:synopsis: TLS/SSL wrapper for socket objects
-.. moduleauthor:: Bill Janssen <bill.janssen@gmail.com>
-.. sectionauthor:: Bill Janssen <bill.janssen@gmail.com>
-
**Source code:** :source:`Lib/ssl.py`
.. index:: single: OpenSSL; (use in module ssl)
:synopsis: Utilities for interpreting the results of os.stat(),
os.lstat() and os.fstat().
-.. sectionauthor:: Skip Montanaro <skip@automatrix.com>
-
**Source code:** :source:`Lib/stat.py`
--------------
.. module:: statistics
:synopsis: Mathematical statistics functions
-.. moduleauthor:: Steven D'Aprano <steve+python@pearwood.info>
-.. sectionauthor:: Steven D'Aprano <steve+python@pearwood.info>
-
.. versionadded:: 3.4
**Source code:** :source:`Lib/statistics.py`
.. module:: stringprep
:synopsis: String preparation, as per RFC 3453
-.. moduleauthor:: Martin v. Löwis <martin@v.loewis.de>
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
**Source code:** :source:`Lib/stringprep.py`
--------------
.. module:: subprocess
:synopsis: Subprocess management.
-.. moduleauthor:: Peter Åstrand <astrand@lysator.liu.se>
-.. sectionauthor:: Peter Åstrand <astrand@lysator.liu.se>
-
**Source code:** :source:`Lib/subprocess.py`
--------------
--------------
-.. moduleauthor:: Jeremy Hylton <jeremy@alum.mit.edu>
-.. sectionauthor:: Benjamin Peterson <benjamin@python.org>
-
-
Symbol tables are generated by the compiler from AST just before bytecode is
generated. The symbol table is responsible for calculating the scope of every
identifier in the code. :mod:`!symtable` provides an interface to examine these
.. module:: sysconfig
:synopsis: Python's configuration information
-.. moduleauthor:: Tarek Ziadé <tarek@ziade.org>
-.. sectionauthor:: Tarek Ziadé <tarek@ziade.org>
-
.. versionadded:: 3.2
**Source code:** :source:`Lib/sysconfig`
:synopsis: Tool for detecting white space related problems in Python
source files in a directory tree.
-.. moduleauthor:: Tim Peters <tim_one@users.sourceforge.net>
-.. sectionauthor:: Peter Funk <pf@artcom-gmbh.de>
-
-.. rudimentary documentation based on module comments
-
**Source code:** :source:`Lib/tabnanny.py`
--------------
.. module:: tarfile
:synopsis: Read and write tar-format archive files.
-.. moduleauthor:: Lars Gustäbel <lars@gustaebel.de>
-.. sectionauthor:: Lars Gustäbel <lars@gustaebel.de>
-
**Source code:** :source:`Lib/tarfile.py`
--------------
.. module:: tempfile
:synopsis: Generate temporary files and directories.
-.. sectionauthor:: Zack Weinberg <zack@codesourcery.com>
-
**Source code:** :source:`Lib/tempfile.py`
.. index::
.. module:: test
:synopsis: Regression tests package containing the testing suite for Python.
-.. sectionauthor:: Brett Cannon <brett@python.org>
-
.. note::
The :mod:`!test` package is meant for internal use by Python only. It is
documented for the benefit of the core developers of Python. Any use of
.. module:: textwrap
:synopsis: Text wrapping and filling
-.. moduleauthor:: Greg Ward <gward@python.net>
-.. sectionauthor:: Greg Ward <gward@python.net>
-
**Source code:** :source:`Lib/textwrap.py`
--------------
.. module:: tkinter
:synopsis: Interface to Tcl/Tk for graphical user interfaces
-.. moduleauthor:: Guido van Rossum <guido@Python.org>
-
**Source code:** :source:`Lib/tkinter/__init__.py`
--------------
.. module:: tkinter.scrolledtext
:synopsis: Text widget with a vertical scroll bar.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/tkinter/scrolledtext.py`
--------------
.. module:: tkinter.ttk
:synopsis: Tk themed widget set
-.. sectionauthor:: Guilherme Polo <ggpolo@gmail.com>
-
**Source code:** :source:`Lib/tkinter/ttk.py`
.. index:: single: ttk
.. module:: token
:synopsis: Constants representing terminal nodes of the parse tree.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/token.py`
--------------
.. module:: tokenize
:synopsis: Lexical scanner for Python source code.
-.. moduleauthor:: Ka Ping Yee
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/tokenize.py`
--------------
.. module:: tomllib
:synopsis: Parse TOML files.
-.. moduleauthor:: Taneli Hukkinen
-.. sectionauthor:: Taneli Hukkinen
-
**Source code:** :source:`Lib/tomllib`
--------------
.. module:: tty
:synopsis: Utility functions that perform common terminal control operations.
-.. moduleauthor:: Steen Lumholt
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-
**Source code:** :source:`Lib/tty.py`
--------------
.. module:: turtle
:synopsis: An educational framework for simple graphics applications
-.. sectionauthor:: Gregor Lingl <gregor.lingl@aon.at>
-
**Source code:** :source:`Lib/turtle.py`
.. testsetup:: default
.. module:: unicodedata
:synopsis: Access the Unicode Database.
-.. moduleauthor:: Marc-André Lemburg <mal@lemburg.com>
-.. sectionauthor:: Marc-André Lemburg <mal@lemburg.com>
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
.. index::
single: Unicode
single: character
:mod:`!unittest.mock` --- getting started
=========================================
-.. moduleauthor:: Michael Foord <michael@python.org>
.. currentmodule:: unittest.mock
.. versionadded:: 3.3
.. module:: unittest.mock
:synopsis: Mock object library.
-.. moduleauthor:: Michael Foord <michael@python.org>
.. currentmodule:: unittest.mock
.. versionadded:: 3.3
.. module:: unittest
:synopsis: Unit testing framework for Python.
-.. moduleauthor:: Steve Purcell <stephen_purcell@yahoo.com>
-.. sectionauthor:: Steve Purcell <stephen_purcell@yahoo.com>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-.. sectionauthor:: Raymond Hettinger <python@rcn.com>
-
**Source code:** :source:`Lib/unittest/__init__.py`
--------------
.. module:: urllib.error
:synopsis: Exception classes raised by urllib.request.
-.. moduleauthor:: Jeremy Hylton <jeremy@alum.mit.edu>
-.. sectionauthor:: Senthil Kumaran <orsenthil@gmail.com>
-
**Source code:** :source:`Lib/urllib/error.py`
--------------
.. module:: urllib.request
:synopsis: Extensible library for opening URLs.
-.. moduleauthor:: Jeremy Hylton <jeremy@alum.mit.edu>
-.. sectionauthor:: Moshe Zadka <moshez@users.sourceforge.net>
-.. sectionauthor:: Senthil Kumaran <senthil@uthcode.com>
-
**Source code:** :source:`Lib/urllib/request.py`
--------------
:synopsis: Load a robots.txt file and answer questions about
fetchability of other URLs.
-.. sectionauthor:: Skip Montanaro <skip.montanaro@gmail.com>
-
**Source code:** :source:`Lib/urllib/robotparser.py`
.. index::
.. module:: uuid
:synopsis: UUID objects (universally unique identifiers) according to RFC 9562
-.. moduleauthor:: Ka-Ping Yee <ping@zesty.ca>
-.. sectionauthor:: George Yoshida <quiver@users.sourceforge.net>
**Source code:** :source:`Lib/uuid.py`
.. module:: venv
:synopsis: Creation of virtual environments.
-.. moduleauthor:: Vinay Sajip <vinay_sajip@yahoo.co.uk>
-.. sectionauthor:: Vinay Sajip <vinay_sajip@yahoo.co.uk>
-
.. versionadded:: 3.3
**Source code:** :source:`Lib/venv/`
.. module:: wave
:synopsis: Provide an interface to the WAV sound format.
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-.. Documentations stolen from comments in file.
-
**Source code:** :source:`Lib/wave.py`
--------------
.. module:: weakref
:synopsis: Support for weak references and weak dictionaries.
-.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-.. moduleauthor:: Neil Schemenauer <nas@arctrix.com>
-.. moduleauthor:: Martin von Löwis <martin@loewis.home.cs.tu-berlin.de>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/weakref.py`
--------------
.. module:: webbrowser
:synopsis: Easy-to-use controller for web browsers.
-.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/webbrowser.py`
--------------
.. module:: winreg
:synopsis: Routines and objects for manipulating the Windows registry.
-.. sectionauthor:: Mark Hammond <MarkH@ActiveState.com>
-
**Source code:** :source:`PC/winreg.c`
--------------
.. module:: winsound
:synopsis: Access to the sound-playing machinery for Windows.
-.. moduleauthor:: Toby Dickenson <htrd90@zepler.org>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`PC/winsound.c`
--------------
.. module:: wsgiref
:synopsis: WSGI Utilities and Reference Implementation.
-.. moduleauthor:: Phillip J. Eby <pje@telecommunity.com>
-.. sectionauthor:: Phillip J. Eby <pje@telecommunity.com>
-
**Source code:** :source:`Lib/wsgiref`
--------------
.. module:: xml.dom.minidom
:synopsis: Minimal Document Object Model (DOM) implementation.
-.. moduleauthor:: Paul Prescod <paul@prescod.net>
-.. sectionauthor:: Paul Prescod <paul@prescod.net>
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
**Source code:** :source:`Lib/xml/dom/minidom.py`
--------------
.. module:: xml.dom.pulldom
:synopsis: Support for building partial DOM trees from SAX events.
-.. moduleauthor:: Paul Prescod <paul@prescod.net>
-
**Source code:** :source:`Lib/xml/dom/pulldom.py`
--------------
.. module:: xml.dom
:synopsis: Document Object Model API for Python.
-.. sectionauthor:: Paul Prescod <paul@prescod.net>
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
**Source code:** :source:`Lib/xml/dom/__init__.py`
--------------
.. module:: xml.etree.ElementTree
:synopsis: Implementation of the ElementTree API.
-.. moduleauthor:: Fredrik Lundh <fredrik@pythonware.com>
-
**Source code:** :source:`Lib/xml/etree/ElementTree.py`
--------------
.. module:: xml
:synopsis: Package containing XML processing modules
-.. sectionauthor:: Christian Heimes <christian@python.org>
-.. sectionauthor:: Georg Brandl <georg@python.org>
-
**Source code:** :source:`Lib/xml/`
--------------
.. module:: xml.sax.handler
:synopsis: Base classes for SAX event handlers.
-.. moduleauthor:: Lars Marius Garshol <larsga@garshol.priv.no>
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
**Source code:** :source:`Lib/xml/sax/handler.py`
--------------
.. module:: xml.sax.xmlreader
:synopsis: Interface which SAX-compliant XML parsers must implement.
-.. moduleauthor:: Lars Marius Garshol <larsga@garshol.priv.no>
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
**Source code:** :source:`Lib/xml/sax/xmlreader.py`
--------------
.. module:: xml.sax
:synopsis: Package containing SAX2 base classes and convenience functions.
-.. moduleauthor:: Lars Marius Garshol <larsga@garshol.priv.no>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
**Source code:** :source:`Lib/xml/sax/__init__.py`
--------------
.. module:: xml.sax.saxutils
:synopsis: Convenience functions and classes for use with SAX.
-.. moduleauthor:: Lars Marius Garshol <larsga@garshol.priv.no>
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
**Source code:** :source:`Lib/xml/sax/saxutils.py`
--------------
.. module:: xmlrpc.client
:synopsis: XML-RPC client access.
-.. moduleauthor:: Fredrik Lundh <fredrik@pythonware.com>
-.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
-
**Source code:** :source:`Lib/xmlrpc/client.py`
.. XXX Not everything is documented yet. It might be good to describe
.. module:: xmlrpc.server
:synopsis: Basic XML-RPC server implementations.
-.. moduleauthor:: Brian Quinlan <brianq@activestate.com>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
**Source code:** :source:`Lib/xmlrpc/server.py`
--------------
.. module:: zipfile
:synopsis: Read and write ZIP-format archive files.
-.. moduleauthor:: James C. Ahlstrom <jim@interet.com>
-.. sectionauthor:: James C. Ahlstrom <jim@interet.com>
-
**Source code:** :source:`Lib/zipfile/`
--------------
.. module:: zipimport
:synopsis: Support for importing Python modules from ZIP archives.
-.. moduleauthor:: Just van Rossum <just@letterror.com>
-
**Source code:** :source:`Lib/zipimport.py`
--------------
.. versionadded:: 3.9
-.. moduleauthor:: Paul Ganssle <paul@ganssle.io>
-.. sectionauthor:: Paul Ganssle <paul@ganssle.io>
-
**Source code:** :source:`Lib/zoneinfo`
--------------
Function Annotations
--------------------
-.. sectionauthor:: Zachary Ware <zachary.ware@gmail.com>
.. index::
pair: function; annotations
single: ->; function annotations
Intermezzo: Coding Style
========================
-.. sectionauthor:: Georg Brandl <georg@python.org>
.. index:: pair: coding; style
Now that you are about to write longer, more complex pieces of Python, it is a
Using Lists as Stacks
---------------------
-.. sectionauthor:: Ka-Ping Yee <ping@lfw.org>
-
-
The list methods make it very easy to use a list as a stack, where the last
element added is the first element retrieved ("last-in, first-out"). To add an
item to the top of the stack, use :meth:`~list.append`. To retrieve an item from the
Using Lists as Queues
---------------------
-.. sectionauthor:: Ka-Ping Yee <ping@lfw.org>
-
It is also possible to use a list as a queue, where the first element added is
the first element retrieved ("first-in, first-out"); however, lists are not
efficient for this purpose. While appends and pops from the end of list are
Floating-Point Arithmetic: Issues and Limitations
**************************************************
-.. sectionauthor:: Tim Peters <tim_one@users.sourceforge.net>
-.. sectionauthor:: Raymond Hettinger <python at rcn dot com>
-
-
Floating-point numbers are represented in computer hardware as base 2 (binary)
fractions. For example, the **decimal** fraction ``0.625``
has value 6/10 + 2/100 + 5/1000, and in the same way the **binary** fraction ``0.101``
Using Python on macOS
*********************
-.. sectionauthor:: Bob Savage <bobsavage@mac.com>
-.. sectionauthor:: Ned Deily <nad@python.org>
-
This document aims to give an overview of macOS-specific behavior you should
know about to get started with Python on Mac computers.
Python on a Mac running macOS is very similar to Python on other Unix-derived platforms,
Using Python on Unix platforms
********************************
-.. sectionauthor:: Shriphani Palakodety
-
-
Getting and installing the latest version of Python
===================================================
Using Python on Windows
*************************
-.. sectionauthor:: Steve Dower <steve.dower@python.org>
-
This document aims to give an overview of Windows-specific behaviour you should
know about when using Python on Microsoft Windows.
Pior Bastida
Nick Bastin
Ned Batchelder
+Facundo Batista
Jeff Bauer
Michael R Bax
Anthony Baxter
Nicolas Chauvat
Jerry Chen
Michael Chermside
+Dmitry Chestnykh
Ingrid Cheung
Adam Chhina
Terry Chia
Scott David Daniels
Derzsi Dániel
Lawrence D'Anna
+Steven D'Aprano
Ben Darnell
Kushal Das
Jonathan Dasteel
Karmen Dykstra
Josip Dzolonga
Maxim Dzumanenko
+Phillip J. Eby
Hans Eckardt
Rodolpho Eckhardt
Ulrich Eckhardt
Jason Harper
David Harrigan
Brian Harring
+Peter Harris
Jonathan Hartley
Travis B. Hartwell
Henrik Harutyunyan
Henrik Heimbuerger
Christian Heimes
Thomas Heller
+Doug Hellmann
Malte Helmert
Lance Finn Helsten
Gordon P. Hemsley
Michael Hudson
Roberto Hueso Gomez
Jim Hugunin
+Taneli Hukkinen
Greg Humphreys
Chris Hunt
Eric Huss
Andrei Kulakov
Ilya Kulakov
Upendra Kumar
+Senthil Kumaran
Toshio Kuratomi
Ilia Kurenkov
Vladimir Kushnir
Nick Lockwood
Stephanie Lockwood
Martin von Löwis
+Edward Loper
Hugo Lopes Tavares
Guillermo López-Anglada
Anne Lord
Raymond Lu
Lukas Lueg
Loren Luke
+Steen Lumholt
Fredrik Lundh
Mike Lundy
Zhongyue Luo
Suman Saha
Koki Saito
Hajime Saitou
+Vinay Sajip
George Sakkis
Victor Salgado
Rich Salz
Hirokazu Yamamoto
Masayuki Yamamoto
Zhikang Yan
+Jeffrey Yasskin
Jingchen Ye
Ka-Ping Yee
Chi Hsuan Yen