Skip to content

Commit 3e3b842

Browse files
committed
docs: use definition template and align with assembly notes
1 parent 6a2e2ca commit 3e3b842

4 files changed

Lines changed: 44 additions & 27 deletions

File tree

1_core_language/4_execution_model/1_structure_of_a_program/0_def.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
structure of a python program (Python Software Foundation, 2023):
2+
- formal: ???
3+
- in words: ???
4+
Q: Is there a formal notion/definition of a Python program?
5+
6+
- plain english: ???
7+
8+
- intuition: ???
9+
10+
- properties:
11+
- flow: ???
12+
13+
- composed of code blocks that:
14+
- run in an execution frame.
15+
16+
def name resolution
17+
18+
def block environment
19+
20+
def exec()
21+
22+
def eval()
23+
24+
builtins and restricted execution
25+
def builtins
26+
27+
interaction with dynamic features
28+
29+
exceptions
30+
def exception
31+
32+
def raised
33+
34+
def handled
35+
36+
def termination model error handling
37+
38+
- examples:
39+
- 4_experiments/1_core_language/8_compound_statements/3_for_statement/for.py
40+
41+
References:
42+
Python Software Foundation. 2023. Execution model. https://docs.python.org/3.11/reference/executionmodel.html#structure-of-a-program

1_core_language/4_execution_model/1_structure_of_a_program/1_code_block.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ def code block: piece of python program text that's
2323
see: ./src/3_execution_model/1_code_block.py
2424

2525
References:
26-
Python Software Foundation. 2023. Execution model. https://docs.python.org/3.11/reference/executionmodel.html.
26+
Python Software Foundation. 2023. Execution model. https://docs.python.org/3.11/reference/executionmodel.html

1_core_language/4_execution_model/1_structure_of_a_program/2_execution_frame.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ def execution frame: context
88
see: ./src/3_execution_model/2_execution_frame.py
99

1010
References:
11-
Python Software Foundation. 2023. Execution model. https://docs.python.org/3.11/reference/executionmodel.html#structure-of-a-program.
11+
Python Software Foundation. 2023. Execution model. https://docs.python.org/3.11/reference/executionmodel.html#structure-of-a-program

0 commit comments

Comments
 (0)