Chapter 10 - Definitions Flashcards
Define aliases
Multiple variables that contain references to the same object
Define clone
To create a new object that has the same value as an existing object. Copying a reference to an object creates an alias but doesn’t clone the object
Define delimiter
A character or string used to indicate where a string should be split
Define element
One of the values in a list (or other sequence). The bracket operator selects elements of a list.
Define index
An integer variable or value that indicates an element of a list
Define list
A collection of objects, where each object is identified by an index. Like other types str, int, float, etc. there is also a list type-converter function that tries to turn its argument into a list
Define list traversal
The sequential accessing of each element in a list
Define modifier
A function which changes its arguments inside the function body. Only mutable types can be changed by modifiers
Define mutable data type
A data type in which the elements can be modified. All mutable types are compound types. Lists are mutable data types; strings are not.
Define nested list
A list that is an element of another list
Define object
A thing to which a variable can refer
Define pattern
A sequence statements, or a style of coding something that has general applicability in a number of different situations. Part of the becoming a mature Computer Scientist is to learn and establish the patterns and algorithms that form your toolkit. Patterns often correspond to your “mental chunking”.
Define pure function
A function with no side effects. Pure functions only make changes to the calling program through their return values.
Define sequence
Any of the data types that consist of an ordered collection of elements
Define side effect
A change in the state of a program made by calling a function that is not a result of reading the return value from the function. Side effects can only be produced by modifiers