Python lingo Page

Python Lingo



P



Return to Python Official Glossary, Python glossaries, Python jargon, Python terms, Lingo, Python

Python Lingo

Fair Use Source: B09WZJMMJP (FlntPy 2022)

Many terms here are not exclusive to Python, but some common terms have definitions that are specific to the Python community.

Also see the official Python Glossary.


A



* ABC programming language - "A programming language created by Leo Geurts, Lambert Meertens, and Steven Pemberton. Guido van Rossum, who developed Python, worked as a programmer implementing the ABC environment in the 1980s. Block structuring by indentation, built-in tuples and dictionaries, tuple unpacking, the semantics of the for loop, and uniform handling of all sequence types are some of the distinctive characteristics of Python that came from the ABC language." (FlntPy 2022)


* Python Abstract base class (ABC) - Abstract base class (ABC) - "A class that cannot be instantiated, only subclassed. ABCs are how interfaces are formalized in Python. Instead of inheriting from an ABC, a class may also declare that it fulfills the interface by registering with the ABC to become a virtual subclass." (FlntPy 2022)


* Python accessor - accessor - A "method implemented to provide access to a single data attribute. Some authors use accessor as a generic term encompassing getter and setter methods, others use it to refer only to getters, referring to setters as mutators." (FlntPy 2022)


* Python alias - alias - "An alternative name for an object. For example, in a = []; b = a the variable b is an alias to the list bound to a." (FlntPy 2022)


* Python aliasing - aliasing - "Binding two or more names to the same object. Aliasing happens naturally all the time in any language where variables and function parameters hold references to objects. To avoid confusion, just forget the idea that variables are boxes that store objects (an object can’t be in two boxes at the same time). It’s better to think of them as labels attached to objects (an object can have more than one label). See alias (Python alias)." (FlntPy 2022)


* Python argument argument - "An expression passed to a function when it is called. In Pythonic parlance, argument and parameter are often used as synonyms. To be more specific, some authors write "actual argument" to contrast with "formal parameter". See parameter for more about the distinction and usage of these terms." (FlntPy 2022)


* Python attribute - attribute - "Methods and data attributes (i.e., "fields" in Java terms) are all known as attributes in Python. A method is just an attribute that happens to be a callable object (usually a function, but not necessarily)." (FlntPy 2022)



B


* BDFL - "Benevolent Dictator For Life, alias for Guido van Rossum, creator of the Python language. Since PEP 13Python Language Governance was adopted in December 2018, the powers of the BDFL are now in the hands of a Steering Council, and Guido is the 'BDFL emeritus'." (FlntPy 2022)


* Python binary sequence - binary sequence - "Generic term for sequence types with byte elements. The built-in binary sequence types are byte, bytearray, and memoryview." (FlntPy 2022)


* Python BOM - Python Byte Order Mark - BOM - Byte Order Mark - "Byte Order Mark (BOM), a sequence of bytes that may be present at the start of a UTF-16 encoded file. A BOM is the character U+FEFF (ZERO WIDTH NO-BREAK SPACE) encoded to produce either b'\xfe\xff' on a big-endian CPU, or b'\xff\xfe' on a little-endian one. Because there is no U+FFFE character in Unicode, the presence of these bytes unambiguously reveals the byte ordering used in the encoding. Although redundant, a BOM encoded as b'\xef\xbb\xbf' may be found in UTF-8 files saved by some Microsoft applications, and is also required by Excel when reading text files. To read or write such files with Python, use the UTF-8-SIG codec." (FlntPy 2022)


* Python bound method - bound method - "A method that is accessed through an instance becomes bound to that instance. Any method is actually a descriptor. When accessed, a method returns itself wrapped in an object that binds the method to the receiver. That object is the bound method. It can be invoked without passing the value of self. For example, given the assignment my_method = my_obj.method, the bound method can later be called as my_method(). Contrast with unbound method. See receiver (Python receiver)." (FlntPy 2022)


* Python built-in function (Python BIF) - built-in function (BIF) - built-in function (BIF) - "A function bundled with the Python interpreter, coded in the implementation language of the interpreter (i.e., C for CPython; Java for Jython, and so on). The term often refers only to the functions that don’t need to be imported, documented in Chapter 2, "Built-in Functions," of The Python Standard Library Reference. However, built-in modules like sys, math, re, etc. also contain built-in functions." (FlntPy 2022)


* Python byte string - byte string - "An unfortunate name still used to refer to bytes or bytearray in Python 3. In Python 2, the str type was really a byte string, and the term made sense to distinguish str from unicode strings. In Python 3, it makes no sense to insist on this term, and I tried to use byte sequence whenever I needed to talk in general about…​byte sequences." (FlntPy 2022)


* Python bytes-like object - bytes-like object - See also bytes-like and object - "A generic sequence of bytes. The most common bytes-like types are bytes, bytearray, and memoryview but other objects supporting the low-level CPython buffer protocol also qualify, if their elements are single bytes." (FlntPy 2022)



C



* Python callable object - callable object - "An object that can be invoked with the call operator (), to return a result or to perform some action. There are nine flavors of callable objects in Python: user-defined functions, built-in functions, built-in methods, instance methods, generator functions, asynchronous generator functions, coroutines, classes, and instances of classes that implement the __call__ special method." (FlntPy 2022)

* Python CamelCase - CamelCase - "The convention of writing identifiers by joining words with uppercased initials (e.g., ConnectionRefusedError). PEP 8 recommends class names should be written in CamelCase, but the advice is not followed by the Python standard library. See snake_case." (FlntPy 2022)

* Python Cheese Shop - Cheese Shop - "Original name of the Python Package Index (PyPI), after the Monty Python skit about a cheese shop where nothing is available. As of this writing, the alias https:// cheeseshop.python.org still works. See PyPI." (FlntPy 2022)

* Python class - class - "A program construct defining a new type, with data attributes and methods specifying possible operations on them. See type." (FlntPy 2022)

* Python code point - code point - "An integer in the range 0 to 0x10FFFF used to identify an entry in the Unicode character database. As of Unicode 7.0, less than 3% of all code points are assigned to characters. In the Python documentation, the term may be spelled as one or two words. For example, in Chapter 2, 'Built-in Functions,' of the Python Library Reference, the chr function is said to take an integer 'codepoint,' while its inverse, ord, is described as returning a 'Unicode code point'." (FlntPy 2022)

* Python code smell - code smell - "A coding pattern that suggests there may be something wrong with the design of a program. For example, excessive use of isinstance checks against concrete classes is a code smell, as it makes the program harder to extend to deal with new types in the future." (FlntPy 2022)

* Python codec - codec - (encoder/decoder) - "A module with functions to encode and decode, usually from str to bytes and back, although Python has a few codecs that perform bytes to bytes and str to str transformations." (FlntPy 2022)

* Python collection - collection - "Generic term for data structures made of items that can be accessed individually. Some collections can contain objects of arbitrary types (see container) and others only objects of a single atomic type (see flat sequence). list and bytes are both collections, but list is a container, and bytes is a flat sequence." (FlntPy 2022)

* considered harmful - "Edsger Dijkstra’s letter titled "Go To Statement Considered Harmful" established a formula for titles of essays criticizing some computer science technique. Wikipedia’s "Considered harmful" article lists several examples, including "'Considered Harmful' Essays Considered Harmful" by Eric A. Meyer." (FlntPy 2022)

* Python constructor - constructor - "Informally, the __init__ instance method of a class is called its constructor, because its semantics is similar to that of a Java constructor. A better term for __init__ is initializer, as the method does not actually build the instance, but receives it as its self argument. The constructor term better describes the __new__ class method, which Python calls before __init__, and is responsible for actually creating an instance and returning it. See initializer." (FlntPy 2022)

* Python container - container - "An object that holds references to other objects. Most collection types in Python are containers, but some are not. The term is defined in section 3.1. Objects, values and types of the Python Data Model documentation: "Some objects contain references to other objects; these are called containers. Examples of containers are tuples, lists and dictionaries." Contrast with flat sequence, which are collections but not containers. Also see Container (ABC) for a different definition." (FlntPy 2022)

* Python container (ABC) - Container (ABC) - "The Abstract base class (ABC) defined in collections.abc.Container, with a single method __contains__ which implements the in operator. The str and array.array types are virtual subclasses of Container, but they are not containers in the other definition of container." (FlntPy 2022)

* Python context manager - context manager - "An object implementing both the __enter__ and __exit__ special methods, for use in a with block." (FlntPy 2022)

* Python coroutine - coroutine - "A generator used for concurrent programming by receiving values from a scheduler or an event loop via coro.send(value). The term may be used to describe the generator function or the generator object obtained by calling the generator function. See generator (Python generator)." (FlntPy 2022)

* CPython - "The standard Python interpreter, implemented in C. This term is only used when discussing implementation-specific behavior, or when talking about the multiple Python interpreters available, such as PyPy." (FlntPy 2022)

* Python CRUD - CRUD - "Acronym for Create, Read, Update, and Delete, the four basic functions in any application that stores records." (FlntPy 2022)


D



* Python decorator - decorator - "A callable object A that returns another callable object B and is invoked in code using the syntax @A right before the definition of a callable C. When reading such code, the Python interpreter invokes A© and binds the resulting B to the variable previously assigned to C, effectively replacing the definition of C with B. If the target callable C is a function, then A is a function decorator; if C is a class, then A is a class decorator." (FlntPy 2022)

* Python deep copy - deep copy - "A copy of an object in which all the objects that are attributes of the object are themselves also copied. Contrast with shallow copy (Python shall copy)." (FlntPy 2022)

* Python descriptor - descriptor - "A class implementing one or more of the __get__, __set__, or __delete__ special methods acts as a descriptor when one of its instances is used as a class attribute of another class, the managed class. A descriptor manages the access and deletion of a managed attribute in the managed instance. For example, in a Django model, the user’s model.Model subclass is the managed class, the fields are descriptors, and each record is a managed instance." (FlntPy 2022)

* Python docstring - docstring - "Short for documentation string. When the first statement in a module, class, or function is a string literal, it is taken to be the docstring for the enclosing object, and the interpreter saves it as the __doc__ attribute of that object. See also doctest (Python doctest)." (FlntPy 2022)

* Python doctest - doctest - "A module with functions to parse and run examples embedded in the docstrings of Python modules or in plain-text files. May also be used from the command line as: python -m doctest module_with_tests.py" (FlntPy 2022)

* DRY - "Don’t Repeat Yourself — a software engineering principle stating that "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." It first appeared in the book The Pragmatic Programmer by Andy Hunt and Dave Thomas (Addison-Wesley, 1999)." (FlntPy 2022)

* Python duck typing - duck typing - "A form of polymorphism where functions operate on any object that implements the appropriate methods, regardless of their classes or explicit interface declarations." (FlntPy 2022)

* Python dunder - dunder - "Shortcut to pronounce the names of special methods and attributes that are written with leading and trailing double-underscores (i.e., __len__ is read as "dunder len")." (FlntPy 2022)

* Python dunder method - dunder method - See dunder and special method (Python special method).


E



* EAFP - "Acronym standing for the quote "It’s easier to ask forgiveness than ask permission," attributed to computer pioneer Grace Hopper, and quoted by Pythonistas referring to dynamic programming practices like accessing attributes without testing first if they exist, and then catching the exception when that is the case. The docstring for the hasattr function actually says that it works "by calling getattr(object, name) and catching AttributeError."" (FlntPy 2022)

* Python eager - eager - "An iterable object that builds all its items at once. In Python, a list comprehension is eager. Contrast with lazy (see Python lazy)." (FlntPy 2022)


F



* Python fail-fast - fail-fast - "A systems design approach recommending that errors should be reported as early as possible. Python adheres to this principle more closely than most dynamic languages. For example, there is no "undefined" value: variables referenced before initialization generate an error, and my_dict[k] raises an exception if k is missing (in contrast with JavaScript). As another example, parallel assignment via tuple unpacking in Python only works if every item is explicitly handled, while Ruby silently deals with item count mismatches by ignoring unused items on the right side of the =, or by assigning nil to extra variables on the left side." (FlntPy 2022)

* Python falsy - falsy - "Any value x for which bool(x) returns False; Python implicitly calls bool(…) to evaluate objects in Boolean contexts, such as the expression controlling an if or while loop. The bool function considers falsy: False, None, any number equal to zero, any sequence or collection with length zero, any object with a __bool__ method that returns False. By convention, all other objects are truthy." (FlntPy 2022)

* Python file-like object - file-like object (see also file-like) - "Used informally in the official documentation to refer to objects implementing the file protocol, with methods such as read, write, close, etc. Common variants are text files containing encoded strings with line-oriented reading and writing, StringIO instances which are in-memory text files, and binary files, containing unencoded bytes. The latter may be buffered or unbuffered. ABCs for the standard file types are defined in the io module since Python 2.6." (FlntPy 2022)

* Python first-class function - first-class function (see also first-class) - "Any function that is a first-class object in the language (i.e., can be created at runtime, assigned to variables, passed as an argument, and returned as the result of another function). Python functions are first-class functions." (FlntPy 2022)

* Python flat sequence - flat sequence - "A sequence type that physically stores the values of its items, and not references to other objects. The built-in types str, bytes, bytearray, memoryview, and array.array are flat sequences. Contrast with list, tuple, and collections.deque, which are container sequences. See container (Python container)." (FlntPy 2022)

* Python function - function - "Strictly, an object resulting from evaluation of a def block or a lambda expression. Informally, the word function is used to describe any callable object, such as methods and even classes sometimes. The official Built-in Functions list includes several built-in classes like dict, range, and str. Also see callable object." (FlntPy 2022)



G



* Python genexp - genexp - "Short for generator expression (see Python generator expression)." (FlntPy 2022)

* Python generator - generator - "An iterator built with a generator function or a generator expression that may produce values without necessarily iterating over a collection; the canonical example is a generator to produce the Fibonacci series which, because it is infinite, would never fit in a collection. The term is sometimes used to describe a generator function, besides the object that results from calling it." (FlntPy 2022)

* Python generator function - generator function - "A function that has the yield keyword in its body. When invoked, a generator function returns a generator." (FlntPy 2022)

* Python generator expression - generator expression - "An expression enclosed in parentheses using the same syntax of a list comprehension, but returning a generator instead of a list. A generator expression can be understood as a lazy version of a list comprehension. See lazy (Python lazy)." (FlntPy 2022)

* generic function (see also generic and generic method) - "A group of functions designed to implement the same operation in customized ways for different object types. As of Python 3.4, the functools.singledispatch decorator is the standard way to create generic functions. This is known as multimethods in other languages." (FlntPy 2022)

* GoF book - Alias for Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley, 1995), authored by the so-called Gang of Four (GoF): Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides.



H



* Python hashable - hashable - "An object is hashable if it has both __hash__ and __eq__ methods, with the cons[[traint]]s that the hash value must never change and if a

b then hash(a)

hash(b) must also be True. Most immutable built-in types are hashable, but a tuple is only hashable if every one of its items is also hashable." (FlntPy 2022)

* Python higher-order function - higher-order function - "A function that takes another function as argument, like sorted, map, and filter, or a function that returns a function as result, as Python decorators do." (FlntPy 2022)


I



* Python idiom - idiom - "A manner of speaking that is natural to native speakers of a language," according to the Princeton WordNet." (FlntPy 2022)

* Python import time - import time (see also import) - "The moment of initial execution of a module when its code is loaded by the Python interpreter, evaluated from top to bottom, and compiled into bytecode. This is when classes and functions are defined and become live objects. This is also when decorators are executed." (FlntPy 2022)

* Python initializer - initializer - "A better name for the __init__ method (instead of constructor). Initializing the instance received as self is the task of __init__. Actual instance construction is done by the __new__ method. See constructor (Python constructor)." (FlntPy 2022)

* Python iterable - iterable - "Any object from which the iter built-in function can obtain an iterator. An iterable object works as the source of items in for loops, comprehensions, and tuple unpacking. Objects implementing an __iter__ method returning an iterator are iterable. Sequences are always iterable; other objects implementing a __getitem__ method may also be iterable." (FlntPy 2022)

* Python iterable unpacking - iterable unpacking - "A modern, more precise synonym for tuple unpacking. See also parallel assignment (Python parallel assignment)." (FlntPy 2022)

* Python iterator - iterator - "Any object that implements the __next__ no-argument method, which returns the next item in a series, or raises StopIteration when there are no more items. Python iterators also implement the __iter__ method so they are also iterable. Classic iterators, according to the original design pattern, return items from a collection. A generator is also an iterator, but it’s more flexible. See generator (Python generator)." (FlntPy 2022)



J


None


K



* KISS principle - "The acronym stands for "Keep It Simple, Stupid." This calls for seeking the simplest possible solution, with the fewest moving parts. The phrase was coined by Kelly Johnson, a highly accomplished aerospace engineer who worked in the real Area 51 designing some of the most advanced aircraft of the 20th century." (FlntPy 2022)


L



* Python lazy - lazy - "An iterable object that produces items on demand. In Python, generators are lazy. Contrast with eager (Python eager)." (FlntPy 2022)

* Python listcomp - listcomp - Short for list comprehension (Python list comprehension).

* Python list comprehension - list comprehension - "An expression enclosed in brackets that uses the for and in keywords to build a list by processing and filtering the elements from one or more iterables. A list comprehension works eagerly. See eager (Python eager)." (FlntPy 2022)

* Python liveness - liveness - "An asynchronous, threaded, or distributed system exhibits the liveness property when "something good eventually happens" (i.e., even if some expected computation is not happening right now, it will be completed eventually). If a system deadlocks, it has lost its liveness." (FlntPy 2022)



M



* Python magic method - magic method (see also magic) - "Same as special method." (FlntPy 2022)

* Python managed attribute - managed attribute - "A public attribute managed by a descriptor object. Although the managed attribute is defined in the managed class, it operates like an instance attribute (i.e., it usually has a value per instance, held in a storage attribute). See descriptor (Python descriptor)." (FlntPy 2022)

* Python managed class - managed class - "A class that uses a descriptor object to manage one of its attributes. See descriptor (Python descriptor)." (FlntPy 2022)

* Python managed instance - managed instance (see also managed and instance) - "An instance of a managed class. See descriptor (Python descriptor)." (FlntPy 2022)

* Python metaclass - metaclass - "A class whose instances are classes. By default, Python classes are instances of type, for example, type(int) is the class type, therefore type is a metaclass. User-defined metaclasses can be created by subclassing type." (FlntPy 2022)

* Python metaprogramming - metaprogramming - "The practice of writing programs that use runtime information about themselves to change their behavior. For example, an ORM may introspect model class declarations to determine how to validate database record fields and convert database types to Python types." (FlntPy 2022)

* Python monkey patching - monkey patching - "Dynamically changing a module, class, or function at runtime, usually to add features or fix bugs. Because it is done in memory and not by changing the source code, a monkey patch only affects the currently running instance of the program. Monkey patches break encapsulation and tend to be tightly coupled to the implementation details of the patched code units, so they are seen as temporary workarounds and not a recommended technique for code integration." (FlntPy 2022)

* Python mixin class - mixin class (see also mixin and Python mixin) - "A class designed to be subclassed together with one or more additional classes in a multiple-inheritance class tree. A mixin class should never be instantiated, and a concrete subclass of a mixin class should also subclass another nonmixin class." (FlntPy 2022)

* Python mixin method - mixin method (see also mixin) - "A concrete method implementation provided in an ABC or in a mixin class." (FlntPy 2022)

* Python mutator - mutator - "See accessor (Python accessor)." (FlntPy 2022)



N



* Python name mangling - name mangling (see also mangling - Python mangling) - "The automatic renaming of private attributes from __x to _MyClass__x, performed by Python at runtime." (FlntPy 2022)

* Python nonoverriding descriptor - nonoverriding descriptor - "A descriptor that does not implement __set__ and therefore does not interfere with setting of the managed attribute in the managed instance. Consequently, if a namesake attribute is set in the managed instance, it will shadow the descriptor in that instance. Also called nondata descriptor or shadowable descriptor. Contrast with overriding descriptor (Python overriding descriptor)." (FlntPy 2022)



O



* Python ORM - Python Object-Relational Mapper - ORM - "Object-Relational Mapper — an API that provides access to database tables and records as Python classes and objects, providing method calls to perform database operations. SQLAlchemy is a popular standalone Python ORM; the Django and Web2py frameworks have their own bundled ORMs." (FlntPy 2022)

* Python overriding descriptor - overriding descriptor - "A descriptor that implements __set__ and therefore intercepts and overrides attempts at setting the managed attribute in the managed instance. Also called data descriptor or enforced descriptor. Contrast with non-overriding_descriptor (Python non-overriding_descriptor)." (FlntPy 2022)



P



* Python parallel assignment - parallel assignment - "Assigning to several variables from items in an iterable, using syntax like a, b = [c, d] — also known as destructuring assignment. This is a common application of tuple unpacking." (FlntPy 2022)

* Python parameter - parameter - "Functions are declared with 0 or more "formal parameters," which are unbound local variables. When the function is called, the arguments or "actual arguments" passed are bound to those variables. In Fluent Python, I tried to use argument to refer to an actual argument passed to a function, and parameter for a formal parameter in the function declaration. However, that is not always feasible because the terms parameter and argument are used interchangeably throughout the Python documentation and Python API. See argument (Python argument)." (FlntPy 2022)

* Python prime (verb) - prime (verb) - "Calling next(coro) on a coroutine to advance it to its first yield expression so that it becomes ready to receive values in succeeding coro.send(value) calls." (FlntPy 2022)

* Python PyPI - PyPI - "The Python Package Index, where more than 60,000 packages are available, also known as the ). PyPI is pronounced as "pie-P-eye" to avoid confusion with PyPy." (FlntPy 2022)

* Python PyPy - PyPy - "An alternative implementation of the Python programming language using a toolchain that compiles a subset of Python to machine code, so the interpreter source code is actually written in Python. PyPy also includes a JIT to generate machine code for user programs on the fly — ​like the Java VM does. As of November 2014, PyPy is 6.8 times faster than CPython on average, according to published benchmarks. PyPy is pronounced as "pie-pie" to avoid confusion with PyPI." (FlntPy 2022)

* Pythonic - "Used to praise idiomatic Python code, that makes good use of language features to be concise, readable, and often faster as well. Also said of APIs that enable coding in a way that seems natural to proficient Python programmers. See idiom (Python idiom)." (FlntPy 2022)



Q


None



R



* Python receiver - receiver - "The object to which a method call is applied; e.g. the x in x.play(). The first parameter of the method (conventionally named self) is bound to the receiver. See bound method (Python bound method)." (FlntPy 2022)

* Python refcount - refcount - "The reference counter (Python reference counter) that each CPython object keeps internally in order to determine when it can be destroyed by the garbage collector. See strong reference and weak reference (Python strong reference and Python weak reference)." (FlntPy 2022)

* Python referent - referent - "The object that is the target of a reference. This term is most often used to describe the target of a weak reference." (FlntPy 2022)

* Python REPL - REPL (Read-eval-print loop) - "An interactive console, like the standard python prompt >>> or alternatives like ipython, bpython, and Python Anywhere." (FlntPy 2022)



S



* Python sequence - sequence - "Generic name for any iterable data structure with a known size (e.g., len(s)) and allowing item access via 0-based integer indexes (e.g., s[0]). The word sequence has been part of the Python jargon from the start, but only in Python 2.6 it was formalized as an ABC in collections.abc.Sequence." (FlntPy 2022)

* Python serialization - serialization - "Converting an object from its in-memory structure to a binary or text-oriented format for storage or transmission, in a way that allows the future reconstruction of a clone of the object on the same system or on a different one. The pickle module supports serialization of arbitrary Python objects to a binary format." (FlntPy 2022)

* Python shallow copy - shallow copy - "A copy of an object which shares references to all the objects that are attributes of the original object. Contrast with deep copy. Also see aliasing (Python aliasing)." (FlntPy 2022)

* Python singleton - singleton - "An object that is the only existing instance of a class — usually not by accident but because the class is designed to prevent creation of more than one instance. There is also a design pattern named Singleton, which is a recipe for coding such classes. The None object is a singleton in Python." (FlntPy 2022)

* Python slicing - slicing - "Producing a subset of a sequence by using the slice notation, e.g., my_sequence[2:6]. Slicing usually copies data to produce a new object; in particular, my_sequence[:] creates a shallow copy of the entire sequence. But a memoryview object can be sliced to produce a new memoryview that shares data with the original object." (FlntPy 2022)

* Python snake_case - snake_case - "The convention of writing identifiers by joining words with the underscore character (_) — for example, run_until_complete. PEP 8 calls this style "lowercase with words separated by underscores" and recommends it for naming functions, methods, arguments, and variables. For packages, PEP 8 recommends concatenating words with no separators. The Python standard library has many examples of snake_case identifiers, but also many examples of identifiers with no separation between words (e.g., getattr, classmethod, isinstance, str.endswith, etc.). See CamelCase (Python CamelCase)." (FlntPy 2022)

* Python special method - special method - "A method with a special name such as __getitem__, spelled with leading and trailing double underscores. Almost all special methods recognized by Python are described in the "Data model" chapter of The Python Language Reference, but a few that are used only in specific contexts are documented in other parts of the documentation. For example, the __missing__ method of mappings is mentioned in "4.10. Mapping Types — `dict`" in The Python Standard Library." (FlntPy 2022)

* Python storage attribute - storage attribute - "An attribute in a managed instance used to store the value of an attribute managed by a descriptor. See also managed attribute (Python managed attribute)." (FlntPy 2022)

* Python strong reference - strong reference - "A reference that is counted in an object’s refcount, and keeps that object alive in memory. Contrast with weak reference (Python weak reference)." (FlntPy 2022)

* Python subject - subject - "The value of the expression in the match clause. Python will try to match the pattern in each case clause to the subject." (FlntPy 2022)



T



* Python tuple unpacking - tuple unpacking - "Assigning items from an iterable object to a tuple of variables (e.g., first, second, third == my_list). This is the usual term used by Pythonistas, but iterable unpacking is gaining traction." (FlntPy 2022)

* Python truthy - truthy - "Any value x for which bool(x) returns True; Python implicitly uses bool to evaluate objects in Boolean contexts, such as the expression controlling an if or while loop. By default, a Python object is truthy unless their __bool__ method returns False. See the short list of conventional falsy objects." (FlntPy 2022)

* Python type - type - "Each specific category of program data, defined by a set of possible values and operations on them. Some Python types are close to machine data types (e.g., float and bytes) while others are extensions (e.g., int is not limited to CPU word size, str holds multibyte Unicode data points) and more high-level abstractions (e.g., dict, deque, etc.). Types may be user defined or built into the interpreter (a "built-in" type). Before the type/class unification in Python 2.2, types and classes were different entities, and user-defined classes could not extend built-in types. Since then, built-in types and new-style classes became compatible. Every new-style class is a subclass of the object class and an instance of the type built-in metaclass. In Python 3 all classes new-style classes." (FlntPy 2022)



U



* Python unbound method - unbound method - "An instance method accessed directly on a class is not bound to an instance; therefore it’s said to be an "unbound method." To succeed, a call to an unbound method must explicitly pass an instance of the class as the first argument. That instance will be assigned to the self argument in the method. See bound method (Python bound method)." (FlntPy 2022)

* Python uniform access principle - uniform access principle - "Bertrand Meyer, creator of the Eiffel Language, wrote: "All services offered by a module should be available through a uniform notation, which does not betray whether they are implemented through storage or through computation." Properties and descriptors allow the implementation of the uniform access principle in Python. The lack of a new operator, making function calls and object instantiation look the same, is another form of this principle: the caller does not need to know whether the invoked object is a class, a function, or any other callable." (FlntPy 2022)

* Python user-defined - user-defined - "Almost always in the Python docs the word user refers to you and I — programmers who use the Python language — as opposed to the developers who implement a Python interpreter. So the term "user-defined class" means a class written in Python, as opposed to built-in classes written in C, like str." (FlntPy 2022)



V



* Python view - view - "Python 3 views are special data structures returned by the dict methods .keys(), .values(), and .items(), providing a dynamic view into the dict keys and values without data duplication (which occurs in Python 2 where those methods return lists). All dict views are iterable and support the in operator. In addition, if the items referenced by the view are all hashable, then the view also implements the collections.abc.Set interface. This is the case for all views returned by the .keys() method, and for views returned by .items() when the values are also hashable." (FlntPy 2022)

* Python virtual subclass - virtual subclass - "A class that does not inherit from an ABC but is registered using the register class method. For example, after abc.Sequence.register(MySequence), the call issubclass(MySequence, abc.Sequence) returns True. See documentation for abc.ABCMeta.register." (FlntPy 2022)



W



* Python walrus operator - walrus operator - "Semi-official name for the := operator, formally described in PEP 572Assignment Expressions. Turn your head 90° to the left and think of a walrus to understand why." (FlntPy 2022)

* Python wart - wart - A misfeature of the language. Andrew Kuchling’s famous post Python warts has been acknowledged by the BDFL as influential in the decision to break backward-compatibility in the design of Python 3, as most of the failings could not be fixed otherwise. Many of Kuchling’s issues were fixed in Python 3. See Python Warts in wiki.python.org." (FlntPy 2022)

* weak reference - "A special kind of object reference that does not increase the refcount of the referent object. Weak references are created with one of the functions and data structures in the weakref module. Contrast with strong reference (Python strong reference)." (FlntPy 2022)



X


None


Y



* YAGNI - "'You Ain’t Gonna Need It', a slogan to avoid implementing functionality that is not immediately necessary based on assumptions about future needs." (FlntPy 2022)



Z



* Zen of Python - "Type import this into any Python console since Python 2.2." (FlntPy 2022)


Fair Use Sources


Fair Use Sources:
* fluentpython.com/lingo
* (FlntPy 2022)



{{navbar_python}}

{{navbar_footer}}