Glossary Flashcards
Words described in the glossary of python documentation
> > >
The default Python prompt of the interactive shell.
…
Either:
- The default Python prompt of the interactive shell when entering the code for an indented code block.
- The Ellipsis built-in constant
2to3
A tool that tries to convert Python 2.x code to Python 3.x code.
abstract base class
ABCs provide a blueprint for concrete classes. They don’t contain implementation. They instead provide an interface and make sure the derived concrete classes are properly implemented.
annotation
A label associated with a variable, a class attribute or a function parameter or return value, used by convention as a type hint.
argument
A value passed to a function (or method) when calling the function.
asynchronous context manager
An object which controls the environment seen in an async with statement by defining __aenter__() and __aexit__() methods.
asynchronous generator
A function which returns an asynchronous generator iterator.
asynchronous generator iterator
An object created by an asynchronous generator function.
asynchronous iterable
An object that can be used in an async for statement.
asynchronous iterator
An object that implements the __aiter__() and __anext__() methods.
attribute
A value associated with an object which is reference by name using dotted expressions.
awaitable
An object that can be used in an await expression.
BDFL
Benevolent Dictator For Life, a.k.a. Guido van Rossum, Python’s creator.
binary file
A file object able to read and write bytes-like objects.
borrowed reference
In Python’s C API, a borrowed reference is a reference to an object.
bytes-like object
An object that supports the Buffer Protocol and can export a C-contiguous buffer.
bytecode
Python source code is compiled into bytecode, the internal representation of a python program in the CPython interpreter.
callback
A subroutine function which is passed as an argument to be executed at some point in the future.
class
A template for creating user-defined objects.
class variable
A variable defined in a class and intended to be modified only at a class level
coercion
The implicit conversion of an instance of one type to another during an operation which involved two arguments of the same type.
complex number
An extension of the familiar real number system in which all numbers are expressed as a sum of a real part and an imaginary part.
context manager
An object which controls the environment seen in a with statement by defining __enter__() and __exit__ () methods.
context variable
A variable which can have different values depending on its context.
contiguous
A buffer is considered contiguous exactly if it is either C-contiguous or Fortran contiguous.
coroutine
Coroutines are a more generalized form of subroutines. Subroutines are entered at one point and exited at another point. Coroutines can be entered exited, and resumed at many different points.
coroutine function
A function which returns a coroutine object.
CPython
The canonical implementation of the Python programming language.
decorator
A function returning another function, usually applied as a function transformation using the @wrapper syntax.
descriptor
Any object which defines the methods __get__(), __set__(), or __delete()__.
dictionary
An associative array, where arbitrary keys are mapped to values.
dictionary comprehension
A compact way to process all or part of the elements in an iterable and return a dictionary with the results.
dictionary view
The objects returned from dict.keys(), dict.values(), and dict.items() are called dictionary views.
docstring
A string literal which appears as the first expression in a class, function, or module.
duck-typing
A programming style which does not look at an object’s type to determine if it has the right interface; instead, the method or attribute is simply called or used (“if it looks like a duck and quacks like a duck, it must be a duck.”).
EAFP
Easier to ask for forgiveness than permission. This common Python coding style assumes the existence of valid keys or attributes and catches exceptions if the assumption proves false.
expression
A piece of syntax which can be evaluated to some value.