bundles / papyri latest / papyri / examples / Patti
class
papyri.examples:Patti
source: /papyri/examples.py :712
Signature
class Patti ( name : str , items : list[int] | None = None ) → None Members
Summary
Small class used to demonstrate cross-linked method docstrings.
Extended Summary
Patti exposes an initialiser, an instance method, a generator method, an async generator method, a classmethod and a staticmethod. Method docstrings reference free functions such as simple_generator and async_fetch so the viewer can exercise :meth: ↔ :func: cross-links in both directions.
Parameters
name: strDisplay name.
items: list of int, optionalPayload values. Defaults to an empty list.
Attributes
name: strThe value passed at construction.
items: list of intThe stored payload.
Examples
p = Patti("demo", items=[1, 2, 3]) p.total()✓
See also
- higher_order
Standalone function taking a
~collections.abc.Callable.- simple_generator
Standalone generator.
Aliases
-
papyri.examples.Patti