Built-in functions — Python 3.15.2 documentation
Code objects can be executed by exec() or eval() . source can either be a normal string, a byte string, or an AST object. Refer to the ast module documentation ...
Code objects can be executed by exec() or eval() . source can either be a normal string, a byte string, or an AST object. Refer to the ast module documentation ...
It converts Python byte code to C arrays; with a C compiler you can embed all your modules into a new program, which is then linked with the standard Python modules. It works by scanning your source recursively for import statements (in both forms)...
Even this simple program illustrates the following key Tk concepts: widgets. A Tkinter user interface is made up of individual widgets. Each widget is ...
(An example of an object supporting multiple forms of iteration would be a tree structure which supports both breadth-first and depth-first traversal.) This method corresponds to the tp_iter slot of the type structure for Python objects in the Python/C API.
Source code: Lib/os.py This module provides a portable way of using operating system dependent functionality. If you just want to read or write a file see ...
This tutorial introduces the reader informally to the basic concepts and features of the Python language and system. Be aware that it expects you to have a basic understanding of programming in general.
Symbols · comment, [1], [2] · in doctests · in printf-style formatting, [1] · in regular expressions · in string formatting · source encoding declaration.
Curses Programming with Python.ORM example ¶. The following code is a simplified skeleton showing how data descriptors could be used to implement an object relational mapping.
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.
This code is exactly equivalent to the first example. Be sure to give the additional functions the same name as the original property (x in this case.) The returned property object also has the attributes fget, fset, and fdel corresponding to the constructor arguments.
sampling . This profiler enables low-overhead performance analysis of running Python processes without requiring code modification or process restart. Tachyon ...
Source code: Lib/socket.py This module provides access to the BSD socket interface. It is available on all modern Unix systems, Windows, MacOS, and probably ...