Glossary Flashcards

Words described in the glossary of python documentation (96 cards)

1
Q

> > >

A

The default Python prompt of the interactive shell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A

Either:

  1. The default Python prompt of the interactive shell when entering the code for an indented code block.
  2. The Ellipsis built-in constant
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

2to3

A

A tool that tries to convert Python 2.x code to Python 3.x code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

abstract base class

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

annotation

A

A label associated with a variable, a class attribute or a function parameter or return value, used by convention as a type hint.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

argument

A

A value passed to a function (or method) when calling the function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

asynchronous context manager

A

An object which controls the environment seen in an async with statement by defining __aenter__() and __aexit__() methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

asynchronous generator

A

A function which returns an asynchronous generator iterator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

asynchronous generator iterator

A

An object created by an asynchronous generator function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

asynchronous iterable

A

An object that can be used in an async for statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

asynchronous iterator

A

An object that implements the __aiter__() and __anext__() methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

attribute

A

A value associated with an object which is reference by name using dotted expressions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

awaitable

A

An object that can be used in an await expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

BDFL

A

Benevolent Dictator For Life, a.k.a. Guido van Rossum, Python’s creator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

binary file

A

A file object able to read and write bytes-like objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

borrowed reference

A

In Python’s C API, a borrowed reference is a reference to an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

bytes-like object

A

An object that supports the Buffer Protocol and can export a C-contiguous buffer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

bytecode

A

Python source code is compiled into bytecode, the internal representation of a python program in the CPython interpreter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

callback

A

A subroutine function which is passed as an argument to be executed at some point in the future.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

class

A

A template for creating user-defined objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

class variable

A

A variable defined in a class and intended to be modified only at a class level

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

coercion

A

The implicit conversion of an instance of one type to another during an operation which involved two arguments of the same type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

complex number

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

context manager

A

An object which controls the environment seen in a with statement by defining __enter__() and __exit__ () methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
context variable
A variable which can have different values depending on its context.
26
contiguous
A buffer is considered contiguous exactly if it is either C-contiguous or Fortran contiguous.
27
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.
28
coroutine function
A function which returns a coroutine object.
29
CPython
The canonical implementation of the Python programming language.
30
decorator
A function returning another function, usually applied as a function transformation using the @wrapper syntax.
31
descriptor
Any object which defines the methods __get__(), __set__(), or __delete()__.
32
dictionary
An associative array, where arbitrary keys are mapped to values.
33
dictionary comprehension
A compact way to process all or part of the elements in an iterable and return a dictionary with the results.
34
dictionary view
The objects returned from dict.keys(), dict.values(), and dict.items() are called dictionary views.
35
docstring
A string literal which appears as the first expression in a class, function, or module.
36
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.").
37
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.
38
expression
A piece of syntax which can be evaluated to some value.
39
extension module
A module written in C or C++, using Python's C API to interact with the core and with user code.
40
f-string
String literals prefixed with 'f' or 'F' are commonly called "f-strings" which is short for formatted string literals.
41
file object
An object exposing a file-oriented API.
42
file-like object
a synonym for file object.
43
filesystem encoding and error handler
Enoding and error handler used by Python to decode bytes from the operating system and encode Unicode to the operating system.
44
finder
An object that tries to find the loader for a module that is being imported.
45
floor division
Mathematical division that rounds down to nearest integer
46
function
A series of statements which returns some value to a caller.
47
function annotation
An annotation of a function parameter or return value.
48
__future__
A future statement that directs the compiler to compile the current module using syntax or semantics that will become standard in a future release of Python.
49
garbage collection
The process of freeing memory when it is not used anymore.
50
generator
A function which returns a generator iterator
51
generator iterator
An object created by a generator function.
52
generator expression
An expression that returns an iterator.
53
Generic function
A function composed of multiple functions implementing the same operation for different types.
54
generic type
A type that can be parameterized; typically a container class such as list or dict.
55
global interpreter lock (GIL)
The mechanism used by the CPython interpreter to assure that only one thread executes Python bytecode at a time.
56
hash-based pyc
A bytecode cache file that uses the hash rather than the last-modified time of the corresponding source file to determine its validity.
57
hashable
An object is hashable if it has a hash value which never changes during its lifetime and can be compared to other objects.
58
IDLE
An Integrated Development Environment for Python that ships with Python.
59
Immutable
An object with a fixed value.
60
Import path
A list of locations that are searched by the path based finder for modules to import.
61
importing
The process by which Python code in one module is made available to Python code in another module.
62
importer
An object that both finds and loads a module; both a finder and loader object.
63
interactive
Python has an interactive interpreter which means you can enter statements and expressions at the interpreter prompt, immediately execute them and see their results.
64
Interpreted
The source files can be run directly without explicitly creating an executable which is then run. Python is an interpreted language, as opposed to a compiled one.
65
interpreter shutdown
When asked to shut down, the Python interpreter enters a special phase where it gradually releases all allocated resources, such as modules and various critical internal structures.
66
Iterable
An object capable of returning its members one at a time.
67
iterator
An object representing a stream of data.
68
key function
A key function or collation function is a callable that returns a value used for sorting or ordering.
69
lambda
An anonymous inline function consisting of a single expression which is evaluated when the function is called.
70
LBYL
Look before you leap. | This coding style explicitly tests for pre-conditions before making calls or lookups.
71
list
A built-in Python sequence
72
list comprehension
A compact way to process all or part of the elements in a sequence and return a list with the results.
73
loader
An object that loads a module.
74
magic method
An informal synonym for "special method."
75
mapping
A container object that supports arbitrary key lookups and implements the methods specified in the Mapping or MutableMapping abstract base classes.
76
meta path finder
A finder returned by a search of sys.meta_path.
77
metaclass
The class of a class.
78
method
A function which is defined inside a class body.
79
method resolution order (MRO)
Method resolution order is the order in which base classes are searched for a member during lookup.
80
module
An object that serves as an organizational unit of Python code.
81
module spec
A namespace containing the import-related information used to load a module.
82
mutable
Mutable objects can change their value but keep their id().
83
named tuple
The term "named tuple" applies to any type or class that inherits from typle and whose indexable elements are also accessible using named attributes.
84
namespace
The place where a variable is stored.
85
namespace package
A PEP 420 package which serves only as a container for subpackages.
86
nested scope
The ability to refer to a variable in an enclosing definition.
87
new-style class
Old name for the flavor of classes now used for all class objects.
88
object
Any data with state (attributes or value) and defined behavior (methods).
89
package
A Python module which can contain submodules or recursively, subpackages.
90
parameter
``` A named entity in a function (or method) definition that specifies an argument (or in some cases, arguments) that the function can accept. There are five types of parameter: positional-or-keyword positional-only keyword-only var-positional var-keyword ```
91
path entry
A single location on the import path which the path based finder consults to find modules for importing.
92
path entry finder
A finder returned by a callable on sys.path_hooks which knows how to locate modules given a path entry.
93
path entry hook
A callable on the sys.path_hook list which returns a path entry finder if it knows how to find modules on a specific path entry.
94
path based finder
One of the default meta path finders which searches an import path for modules.
95
path-like object
An object representing a file system path.
96
PEP
Python Enhancement Proposal. A PEP is a design document providing information to the Python community, or describing a new feature for Python or its processes or environment.