Skip to content

Commit 9f6149d

Browse files
committed
docs: abstract base classes and container abstract base classes
1 parent eef2e10 commit 9f6149d

6 files changed

Lines changed: 55 additions & 4 deletions

File tree

2_standard_library/29_python_runtime_services/0_def.txt renamed to 2_standard_library/29_python_runtime_services/0_python_runtime_services.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ def python_runtime_services:
1515

1616
- proof: ???
1717

18-
References: ???
18+
References:
19+
The Python Standard Library. Python Runtime Services. 2025. https://docs.python.org/3/library/python.html
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
def abcs:
2+
- formal: ???
3+
4+
- in words: ???
5+
6+
- plain english: ???
7+
8+
- intuition: ???
9+
10+
- properties:
11+
- specification:
12+
- https://peps.python.org/pep-3119/
13+
- https://docs.python.org/3/library/abc.html#module-abc
14+
- implementation: https://github.com/python/cpython/blob/3.13/Lib/abc.py
15+
16+
- examples: ???
17+
18+
- use cases: ???
19+
20+
- proof: ???
21+
22+
References:
23+
The Python Standard Library. Python Runtime Services. 2025. https://docs.python.org/3/library/python.html

2_standard_library/4_built_in_types/5_iterator_types/1_iterator.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ def iterator:
2626
- proof: None. It is a definition.
2727

2828
References:
29-
https://docs.python.org/3.11/glossary.html#term-iterator
29+
The Python Standard Library. 2025. https://docs.python.org/3/glossary.html#term-iterator
3030

2_standard_library/4_built_in_types/5_iterator_types/2_generator.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ def generator | generator function:
2121
- proof: None. It is a definition.
2222

2323
References:
24-
https://docs.python.org/3.11/glossary.html#term-generator
24+
The Python Standard Library. 2025. https://docs.python.org/3/glossary.html#term-generator
2525

2626

2_standard_library/4_built_in_types/5_iterator_types/3_generator_expression.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
- proof: None. It is a definition.
2020

2121
References:
22-
https://docs.python.org/3.11/glossary.html#term-generator-iterator
22+
The Python Standard Library. 2025. https://docs.python.org/3/glossary.html#term-generator-iterator
2323

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
def collections_abcs:
2+
- formal: ???
3+
4+
- in words: ???
5+
6+
- plain english: ???
7+
8+
- intuition: ???
9+
10+
- properties:
11+
- implementation: https://github.com/python/cpython/tree/3.11/Lib/_collections_abc.py
12+
- specification: https://docs.python.org/3/library/collections.abc.html
13+
- examples:
14+
- test interface compliance:
15+
- hashable
16+
- iterable
17+
- mapping
18+
- ...
19+
20+
- use cases:
21+
- implement custom classes that satisfy the container API.
22+
- test compliance to a collections' interface using `issubclass` or `isinstance`.
23+
24+
- proof: ???
25+
26+
References:
27+
The Python Standard Library. 2025. collections.abc — Abstract Base Classes for Containers, Data Types. https://docs.python.org/3/library/collections.abc.html

0 commit comments

Comments
 (0)