APDR

Advanced Object-Oriented Programming

Algorithms, Programming, and Data Representation · Module 92313 · Chapter 1011a

Follow how Python objects are stored and found, then use types, descriptors, inheritance, and design patterns to shape dependable interfaces. The last sections connect those mechanisms to language dispatch, common traps, and small decorator-based registries.

Start from memory

Try each prompt before reading; mark it sure, unsure, or guessed.

  1. When does assigning one name to another copy a mutable object?
  2. Which attribute lookup rule can take priority over an instance dictionary?
  3. What property does a consistent method resolution order preserve?
  4. What does a normal Python function do when accessed through an instance?
  5. What does a Protocol check, and when is it checked?
  6. How can a factory differ from a constructor?
Check the short answers
  1. Assignment binds another name to the same object; it does not copy the object. §10.1
  2. A data descriptor found on the class is consulted before the instance dictionary. §10.2, §10.5
  3. It preserves local base-class order and monotonicity while linearising the hierarchy. §10.4
  4. Its descriptor binds the instance as the first argument, producing a bound method. §10.5
  5. Static type checkers can check structural compatibility; the annotation alone does not enforce it at runtime. §10.3
  6. A factory may choose and return a compatible implementation after applying configuration or validation. §11.2

How to use this guide

Trace the object or class first, then identify the lookup or construction rule that applies. When a pattern seems useful, compare its added flexibility with the simpler option it replaces.

  1. Day 0: Study §10.1–10.2; solve practice 1–6.
  2. Day 1: Rebuild §10.3–10.4 and solve practice 7–12.
  3. Day 3: Study §10.5 and §11.1; solve practice 13–17.
  4. About day 7: Rebuild §11.2–11.3 and solve practice 18–24.
  5. About day 14: Attempt both exam problems closed-book; explain uncertain decisions aloud.
  6. Before the exam: Recheck only skills supported by the practice evidence and revisit each linked section for missed answers.

When stuck: draw the names, objects, and lookup path; then test one small example before adding a metaclass or pattern.

How the chapter fits together

Object identity and layout explain what is being shared. Type contracts and MRO explain which behaviours are promised and found. Descriptors control attribute access; design patterns organise construction and collaboration around those rules.

Measure · inspect object relationships

  • Identity and references §10.1

    two names → one object

    Rests on: assignment binds names to objects.

  • Layout and attribute lookup §10.2

    descriptor → instance → class MRO

    Rests on: type and descriptor precedence.

  • Dispatch and runtimes §11.1

    receiver type → implementation

    Rests on: lookup strategy and runtime.

Define · state behavioural contracts

  • Nominal, structural, and variance rules §10.3

    inputs contravariant · outputs covariant

    Rests on: substitutability and promises.

  • C3 MRO §10.4

    class + merge(parent MROs, bases)

    Rests on: ordered, monotonic inheritance.

  • Descriptors and class creation §10.5

    lookup → __get__ / __set__

    Rests on: objects stored on classes can mediate access.

Derive · choose a design from its job

  • Factories and collaboration patterns §11.2

    client → contract → interchangeable object

    Rests on: stable contracts, replaceable implementations.

  • Quirks and decorator registries §11.3

    definition time → shared state / registration

    Rests on: binding time and object lifetime.

Match the question to the tool: identity versus value uses is versus ==; inheritance order uses __mro__; attribute access uses the descriptor rules; implementation choice uses a contract or factory.

10.1 Objects, references, and copying

Assignment creates another route to an object; it does not duplicate a mutable value. A copy makes a new outer container, and a deep copy recursively copies referenced parts where the copy protocol allows.

In plain words: an object is the value with identity and behaviour; a reference is a way to reach it; an alias is another name or container entry that reaches the same object.

Binding and copyingb = a binds b to the object already named by aFor compound objects, copy.copy makes a shallow copy; copy.deepcopy recursively copies supported parts and may copy too much. Python copy documentation.

In CPython, names refer to objects; assignment changes a binding. Mutating a list through either alias is visible through the other. CPython may reuse some immutable objects, so identity observations such as 256 is 256 are not a value-comparison rule. A shallow copy creates a distinct outer list but keeps references to nested items. A deep copy uses a memo to handle cycles and can be customised by a class.

Worked example · nested aliases

  1. a = [[1], [2]] creates an outer list and two inner lists.
  2. b = a.copy() creates a new outer list; a is b is false.
  3. a[0] is b[0] is true, so b[0].append(9) changes the nested list seen through a.
  4. For independent nested lists, use a suitable deep-copy operation; check whether custom objects or resources should remain shared.

Trap: is tests identity, not value equality; use == when equal contents are the question.

Near miss: Copying only the outer list does not isolate a nested mutable item; copy that item too if independent mutation is required.

Recall · §10.1

  1. What does assignment do to a name?
  2. What remains shared after a shallow copy?
Answers
  1. It binds the name to an object; assignment itself does not copy that object. §10.1
  2. References to nested items remain shared. §10.1

10.2 Memory, attributes, and object layout

Python gives objects a flexible interface, while CPython implements them with runtime structures. Instance dictionaries are convenient; slots can reserve known attributes. Attribute access also follows descriptor precedence, so a simple dictionary search is only a sketch.

In plain words: an instance dictionary is the usual place for per-object attributes; slots declare a fixed set; a descriptor is a class attribute that controls access.

Instance attribute lookup (simplified precedence)data descriptor → instance → class value → fallbackThe exact lookup is defined by object.__getattribute__ and may be customised. Descriptor guide.

In CPython’s C API, a regular object header includes a reference count and a type pointer; variable-sized objects add size information. These are implementation details: do not write application logic around a claimed byte size or directly access the fields. Many objects are tracked differently by the garbage collector; reference counting alone cannot reclaim unreachable cycles, so a cyclic collector complements it. C object structures · garbage collector.

Worked example · a slotted point

  1. A point always needs x and y, so declare __slots__ = ("x", "y").
  2. Instances can assign those names; an undeclared attribute raises AttributeError when no base class supplies a dictionary.
  3. Add "__dict__" to the slots only if arbitrary instance attributes are part of the design.
  4. Check the trade-off: fixed attributes and possible memory savings versus less flexibility; do not assume a universal byte count.

Trap: A non-data descriptor can be shadowed by an instance attribute; a data descriptor takes precedence over it.

Near miss: __slots__ on a subclass does not remove a dictionary inherited from a base class that provides one.

Recall · §10.2

  1. Which kind of descriptor wins before an instance dictionary?
  2. What changes when a class declares slots without __dict__?
Answers
  1. A data descriptor. §10.2
  2. Instances are limited to declared slots unless a base class or explicit slot provides a dictionary. §10.2

10.3 Types, protocols, and substitution

Nominal checks use declared class relationships; structural compatibility asks whether the needed operations are present. A type contract is useful only if implementations honour the behaviour that callers rely on. Gradual type hints let checked and unchecked code coexist; user-defined generic classes are invariant by default unless their type parameter is covariant or contravariant. Static analysers approximate program behaviour to find likely mistakes without executing every path.

In plain words: nominal typing recognises named inheritance; structural typing recognises the required shape; substitutability means a replacement preserves the caller’s expectations.

Function-type varianceaccepted inputs may widen · promised outputs may narrowA subtype should accept at least the inputs its parent accepts and return values meeting the parent’s promise.

typing.Protocol describes a structural interface for static type checkers. A protocol annotation does not add a runtime check. A protocol marked @runtime_checkable allows a limited runtime membership check that checks attribute presence, not full signatures. Abstract base classes provide a nominal mechanism and can prevent instantiation while abstract methods remain.

Worked example · a readable protocol

  1. A reporting function needs only write(text).
  2. Describe that operation in a Protocol; a logger with a compatible method can satisfy a static checker without inheriting from the protocol.
  3. If the logger accepts fewer kinds of text than callers may provide, the contract is not substitutable.
  4. Use an ABC when explicit shared implementation or nominal registration is actually needed.

Trap: An annotation does not validate runtime values by itself.

Near miss: A subclass method that rejects a valid base-class input narrows the accepted contract and can break callers.

Recall · §10.3

  1. What does a Protocol primarily support?
  2. How do safe method arguments and results vary in a subtype?
Answers
  1. Structural compatibility checking by static type checkers. §10.3
  2. Arguments may be accepted more broadly; results must meet at least the original promise. §10.3

10.4 MRO and cooperative inheritance

Multiple inheritance needs a predictable order for finding methods. Python’s C3 linearisation preserves each class’s declared base order and the order already established by its parents; inconsistent hierarchies are rejected.

In plain words: the method resolution order (MRO) is the sequence of classes searched for an attribute; cooperative inheritance lets each class continue that search with super().

C3 merge ruleL[C] = [C] + merge(parent MROs, bases)Choose a list head that appears in no other list’s tail; remove it from all lists and repeat. No valid head means the hierarchy conflicts.

For D(B, C) where both B and C inherit from A, the merge gives D, B, C, A, object. The search respects B before C, while moving A behind both parents. super() means the next implementation in this MRO, not simply “the parent”.

Worked example · diamond lookup

  1. Set class B(A), class C(A), then class D(B, C).
  2. Start with L[B] = [B, A, object], L[C] = [C, A, object], and the base order [B, C].
  3. B is a valid head, then C is valid; A must wait until both parent branches are respected.
  4. The final order is D, B, C, A, object; inspect it with D.__mro__.

Trap: A depth-first walk can violate local base order; use the actual MRO.

Near miss: Repeating a shared base in a mixin method without calling super() can stop the cooperative chain early.

Recall · §10.4

  1. What does C3 preserve?
  2. Where does zero-argument super() continue?
Answers
  1. Local base order and the monotonic parent ordering. §10.4
  2. At the next class in the instance’s MRO after the current class. §10.4

10.5 Descriptors and class creation

Descriptors make properties and bound methods work through a shared attribute-access protocol. Class hooks and metaclasses extend the class-creation step; choose the smallest hook that expresses the requirement.

In plain words: a descriptor is an object on a class that participates in reading, writing, or deleting an attribute; a metaclass is the type that creates a class object.

Descriptor operationsread → __get__ · write → __set__ · delete → __delete__A normal function is a non-data descriptor; instance access binds it as a method. The metaclass creates a class object, and its __new__ method can inspect or alter the class namespace during creation. A descriptor defining __set__ or __delete__ is a data descriptor.

property, staticmethod, and classmethod use descriptor behaviour. A function fetched from a class is unbound; through an instance its descriptor returns a method that supplies the instance. For subclass registration, __init_subclass__ or a class decorator is often simpler than a custom metaclass.

Worked example · method binding

  1. class A: def f(self, x): … stores a function as A.__dict__["f"].
  2. A.f accesses it with no instance, so the function is returned without a receiver bound.
  3. A().f invokes the function descriptor with that instance and returns a bound method.
  4. Calling A().f(3) supplies the instance and 3; the method body receives both arguments.

Trap: A descriptor’s __get__ protocol is invoked by attribute access; the class dictionary still contains the descriptor object.

Near miss: Use a metaclass to register every subclass only if __init_subclass__ cannot satisfy the registration rule.

Recall · §10.5

  1. What does function descriptor access through an instance create?
  2. Which simpler hook can observe subclass creation?
Answers
  1. A bound method that supplies the instance as the first argument. §10.5
  2. __init_subclass__ on a base class. §10.5

11.1 Dispatch and language architectures

Languages choose different points at which to select an implementation. Static, virtual, single, and multiple dispatch describe selection rules; they do not by themselves determine the total speed of a program.

In plain words: dispatch selects which implementation handles a call; single dispatch usually selects by one receiver or argument; multiple dispatch selects using several argument types.

Python single dispatchfunctools.singledispatch → first argument typesingledispatchmethod dispatches on the first non-self or non-cls argument. See the functools documentation.

Static languages may bind a non-virtual call at compile time; virtual dispatch selects by runtime class. Python performs dynamic lookup and supports runtime replacement, while modern interpreters may optimise common call sites. Avoid assigning one fixed cost to all dynamic calls. When an operation depends on a pair of types, conditional logic, a visitor, or a multiple-dispatch library may be appropriate; the standard library’s singledispatch is not pairwise dispatch.

Worked example · collision dispatch

  1. The function collide(a, b) has two relevant types.
  2. singledispatch can select on a but does not select directly on the pair (type(a), type(b)).
  3. If behaviour differs for each pair, write explicit branching, use a visitor, or choose a library with a clear multiple-dispatch contract.
  4. Keep the choice visible to callers and test the supported combinations.

Trap: Dynamic dispatch does not imply a particular measured slowdown; benchmark the actual call path.

Near miss: Registering a handler for the first argument’s class does not distinguish two values of the second argument.

Recall · §11.1

  1. Which argument does singledispatch use?
  2. What should guide a performance claim?
Answers
  1. The first argument. §11.1
  2. Measurements on the relevant implementation and workload. §11.1

11.2 Patterns and object construction

Patterns name recurring ways to separate a client from a changing algorithm, collaborator, or product family. Use a direct constructor until configuration, substitution, or coordination makes a pattern useful.

In plain words: a strategy is an interchangeable algorithm; an observer is a registered recipient of changes; a factory chooses how to make an object; a builder assembles a complex value in steps.

Factory boundaryclient → factory → compatible productAn abstract factory creates a related family; a factory method lets a subclass choose a product; a simple factory may be only a function.

The Borg pattern shares state between instances; a singleton restricts instance creation. A module is normally imported once per interpreter process, but this does not make it a universal cross-process singleton. Dependency injection supplies collaborators from outside, which makes replacements easier to test.

Worked example · swap a logger

  1. A service depends on the behaviour log(message), not on a concrete logger class.
  2. A factory chooses a text or JSON logger from configuration.
  3. The service receives that logger through its constructor; tests can pass a recording fake.
  4. If one setting chooses a single product, a small function may be enough; use an abstract factory only when several related products must stay compatible.

Trap: A builder object is mutable configuration; the built request should not accidentally keep a mutable headers dictionary that later builder calls change.

Near miss: Use a singleton when identity is a real requirement, not merely to make access convenient.

Recall · §11.2

  1. When is an abstract factory more useful than a simple factory?
  2. What makes a dependency easy to replace in tests?
Answers
  1. When the client needs a compatible family of related products. §11.2
  2. Depend on a behavioural contract and inject the collaborator. §11.2

11.3 Quirks and decorator DSLs

Several surprising behaviours come from when Python evaluates a definition and what a closure captures. Decorators turn definition-time functions or classes into registries and other small domain-specific languages.

In plain words: a mutable default is created when the function is defined; late binding reads a closure variable when the function runs; name mangling changes a class’s double-underscore attribute name to reduce accidental clashes.

Capture-at-definition fixesdef f(x, values=None): … · lambda i=i: iUse a sentinel to create a fresh mutable value per call; use a default argument or a separate factory to capture a loop value.

Double underscores do not create security privacy. Monkey patching changes a name or attribute at runtime, so keep its scope small and patch where the code under test looks it up. A decorator factory can capture configuration, register a function or class, then return the original object or a wrapper.

Worked example · route registry

  1. Create a dictionary named routes.
  2. route(path) returns a decorator that records the function under that path.
  3. Apply @route("/home"); the function is registered when its definition executes.
  4. Look up and call the registered function later; duplicate-path behaviour should be defined by the application.

Trap: A default list is shared between calls; None is a common sentinel for creating a fresh list.

Near miss: lambda: i in a loop closes over the changing name; lambda i=i: i captures the current value as a default.

Recall · §11.3

  1. When is a function’s default value evaluated?
  2. What does name mangling protect against?
Answers
  1. When the function definition executes. §11.3
  2. Accidental name collisions in subclasses; it is not a security boundary. §11.3

Model map

QuestionRuleUse
Did a copy happen?Assignment binds; shallow and deep copy differ.Trace aliases and nested mutation.
Where does an attribute come from?Descriptor precedence, instance data, class MRO.Explain shadowing and bound methods.
Can the replacement substitute?It accepts promised inputs and returns promised results.Review a subtype or Protocol implementation.
Which method is next?C3 MRO, then cooperative super().Trace a diamond hierarchy.
Which implementation handles a call?Dispatch rule of the runtime or library.Choose single dispatch or a pairwise design.
Who creates the collaborator?Constructor, factory, builder, or injected contract.Separate configuration from service behaviour.

Check every answer: distinguish identity from equality; state when lookup or registration occurs; check whether a promised interface is actually honoured; name the runtime when describing implementation details.

Derive it cold

Rebuild each chain on blank paper, using only the definitions above.

  1. Shallow versus deep copy: draw the outer and nested references before and after each operation. §10.1
  2. Attribute resolution: apply data descriptor, instance dictionary, non-data descriptor, class value, and fallback in order. §10.2
  3. C3 merge: trace the diamond lists until the result is D, B, C, A, object. §10.4
  4. Bound method: trace the function’s __get__ inputs for class access and instance access. §10.5
  5. Factory choice: derive the smallest construction boundary that allows a configured product and a test fake. §11.2

Explain it

Answer each question aloud before opening the model response.

  1. Why does assignment not protect a mutable value from changes through another name?
  2. When can a shallow copy still expose shared mutation?
  3. Why is a byte-size claim about a Python object tied to an implementation?
  4. Why can a Protocol help without changing runtime behaviour?
  5. Why does C3 delay a common ancestor in a diamond?
  6. When is a descriptor more useful than a plain attribute?
  7. Why should you avoid claiming a fixed cost for dynamic dispatch?
  8. When does an abstract factory justify more code than a function?
Show model explanations
  1. Both names refer to the same object, so a mutation through either path changes that object. §10.1
  2. The new outer container still refers to the same nested mutable objects. §10.1
  3. Object layout and allocator details belong to a particular interpreter build, version, and platform. §10.2
  4. A Protocol is primarily a static structural contract; annotations do not enforce values at runtime. §10.3
  5. Putting the shared ancestor first could violate the order already promised by each parent branch. §10.4
  6. When reading, writing, or deleting an attribute needs validation, computation, or managed storage. §10.5
  7. Interpreters can specialise common calls, and costs depend on the call site and workload; measure the actual program. §11.1
  8. When a client needs a compatible family of products and must be insulated from which family is selected. §11.2

Mixed practice

Try all 24 problems before opening the answers. Their order mixes object tracing, contracts, lookup, and design choices.

  1. a = [1]; b = a; b.append(2). What is a?
  2. A user-defined read-only descriptor defines __get__ and __set__ that raises. Can an instance dictionary override it?
  3. A function annotation says item: Sizable where Sizable is a Protocol. Does the annotation reject an incompatible object at runtime?
  4. For D(B, C), where both inherit from A, give the C3 order.
  5. A.f and A().f access a normal function in a class. Which one binds an instance?
  6. A service calls handle(item), and the implementation depends on the type of item. Is singledispatch a reasonable standard-library option?
  7. A GUI can choose Windows or Mac buttons and checkboxes together. Which pattern models the related product family?
  8. def f(items=[]): items.append(1); return items. What does two calls with no argument return?
  9. A top-level copy of a list contains a nested dictionary. Which object is still shared after copy.copy?
  10. A class has __slots__ = ("x",) and no dictionary in its bases. What happens on obj.y = 2?
  11. A subtype accepts str where its base accepts any object. Is that safe substitutability?
  12. A mixin method calls super().save(). Which class does it call next?
  13. A base needs to add every subclass to a registry. What is a simple hook to try before a metaclass?
  14. An operation depends on two argument types. What limitation does plain singledispatch have?
  15. A sort algorithm can be swapped without changing the client. Which pattern fits?
  16. What does __token name mangling provide?
  17. A profile shows that one dynamic call is hot. What evidence supports changing the design?
  18. Several Borg instances share the same state dictionary. Are they the same instance?
  19. Three lambdas created in a loop all return the final loop value. Name one concise fix.
  20. A builder returns a request that directly stores the builder’s mutable headers dictionary. What later action could surprise the caller?
  21. A registry decorator stores a function then returns it unchanged. Is the function name still callable?
  22. A factory reads configuration and may return either a JSON or text logger. What should the service depend on?
  23. A class lookup finds a property and the instance dictionary also has a same-named value. Which normally wins?
  24. An abstract base class registers a virtual subclass. Does the ABC’s implementation enter that class’s MRO?
Show worked answers
  1. [1, 2]: both names refer to the same list. §10.1
  2. No. Defining __set__ makes it a data descriptor, which takes precedence over the instance dictionary. §10.2
  3. No; the annotation supports static checking, but does not itself validate the object when the function runs. §10.3
  4. D, B, C, A, object; local base order places B before C. §10.4
  5. A().f; function descriptor access through the instance returns a bound method. §10.5
  6. Yes; it dispatches on the first argument’s type. §11.1
  7. Abstract factory: it creates a compatible family of related products. §11.2
  8. Both return the same accumulating list, because the default is made once when the definition executes. §11.3
  9. The nested dictionary remains the same object in both outer lists. §10.1
  10. It raises AttributeError, because y is not a slot. §10.2
  11. No. It narrows valid inputs; a subtype should accept at least the inputs callers can pass to the base. §10.3
  12. The next class after the mixin in the object’s MRO, not necessarily its direct textual parent. §10.4
  13. __init_subclass__ on the base class, if it expresses the rule. §10.5
  14. It selects on the first argument only; it does not directly dispatch on the pair of types. §11.1
  15. Strategy: the client uses an interchangeable algorithm object. §11.2
  16. It helps avoid accidental collisions in subclasses; it is not security privacy. §11.3
  17. A benchmark or profile on the relevant interpreter and workload, followed by a check that the alternative improves the measured result. §11.1
  18. No. They are distinct instances that deliberately share state. §11.2
  19. Capture the current value in a default, such as lambda i=i: i, or use a factory function. §11.3
  20. Further builder mutations could change the already-built request; copy or freeze the configuration during build. §11.2
  21. Yes. The decorator returns the original function, which remains bound to its name as usual. §11.3
  22. The shared logging behaviour, not a concrete class; inject the chosen compatible logger. §11.2
  23. The property is a data descriptor and takes priority over the instance dictionary. §10.2, §10.5
  24. No. Virtual registration affects issubclass/isinstance checks, but does not add the ABC to the MRO. §10.3

Exam-style problems

1 · Storage, lookup, and inheritance · 20 minutes

A library defines a slotted Record base, a mixin that adds a computed label property, and two subclasses arranged as a diamond. A caller shallow-copies a record’s list of tags.

  1. Trace whether the copy and original share the outer list and nested tag values. (3 marks)
  2. Explain how the property participates in attribute lookup and whether a same-named instance value wins. (3 marks)
  3. Write the C3 order for Final(Left, Right) where both inherit from Base. (2 marks)
  4. Give two checks before relying on __slots__ to restrict storage. (4 marks)
Show worked answer
  1. A shallow copy creates a new outer list, but nested mutable tag values remain shared. §10.1
  2. A property is a data descriptor, so its getter runs before the instance dictionary value. §10.2, §10.5
  3. Final, Left, Right, Base, object, assuming the stated consistent parent order. §10.4
  4. Check that bases do not supply an instance dictionary, and that every needed dynamic attribute is declared (or __dict__ is explicitly included). Also avoid assuming a fixed byte saving across implementations. §10.2

2 · Extensible service design · 20 minutes

A service can run with either of two transports and either of two output formats. Plugins register implementations with decorators. A team is considering a metaclass, a singleton, and singledispatch.

  1. Choose a construction pattern if transport and format combinations must be compatible. (3 marks)
  2. Describe how a decorator can register each plugin and what it should return. (3 marks)
  3. Explain which argument singledispatch uses and when it is insufficient. (2 marks)
  4. Suggest a simpler subclass-registration mechanism and two tests for plugin contracts. (4 marks)
Show worked answer
  1. An abstract factory can create a compatible family of transport and formatter products; a small factory function may suffice if selection is simpler. §11.2
  2. A decorator receives the plugin, stores it under a stable key, then returns it or an intentional wrapper so the name remains meaningful. §11.3
  3. It dispatches on the first argument only; it is insufficient when behaviour depends on a pair of argument types. §11.1
  4. Use __init_subclass__ or a class decorator if sufficient. Test each implementation’s promised methods and test factory selection plus failure for an unknown key. §10.5, §10.3, §11.2–11.3

Slips in the notes

These points were checked against the lecture and current official Python documentation.

  • Slide 3, copying. The slide says copying requires copy.deepcopy(), but a shallow copy is also a copy; it creates a new outer compound object while keeping references to its elements. Use a deep copy only when recursive independence is intended, and note that copying everything may be inappropriate. Python copy documentation. §10.1
  • Slide 8, attribute lookup. The shown instance-dictionary then class-dictionary sequence is a sketch: data descriptors on the class take precedence over the instance dictionary, and non-data descriptors follow it. Descriptor guide. §10.2, §10.5
  • Slide 34, dispatch cost. The fixed “hashing, collision resolution, MRO traversal” cost is too categorical for modern Python: specialisation and inline caches can optimise common call sites. Treat performance as runtime- and workload-dependent, then profile. Python 3.11 specialisation notes. §11.1

Self-check

Tick a skill only in a later session, at least one day after studying, when you can demonstrate it without notes.

Personal study guide based on “1011a.pdf” (61 slides, 20 November 2025), with regular APDR Chapters 10–11 used for prerequisites. Written in my own words; no lecture pages or figures are reproduced. Not an official FAU publication; check course details against the current notes. Made by Thanate Amornjiraporn (Focus).