https://github.com/eddieantonio/python-is-compiled
Accompanying source code for my blog post "Python is a Compiled Language"
https://github.com/eddieantonio/python-is-compiled
error-messages python
Last synced: about 1 year ago
JSON representation
Accompanying source code for my blog post "Python is a Compiled Language"
- Host: GitHub
- URL: https://github.com/eddieantonio/python-is-compiled
- Owner: eddieantonio
- License: agpl-3.0
- Created: 2023-10-23T14:21:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-25T15:04:30.000Z (over 2 years ago)
- Last Synced: 2025-01-20T14:57:03.916Z (over 1 year ago)
- Topics: error-messages, python
- Language: Python
- Homepage: https://eddieantonio.ca/blog/2023/10/25/python-is-a-compiled-language/
- Size: 23.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Code for "Python is a compiled language"
This consists of Python code that shows that errors are caught at different stages:
- decoding
- scanning (lexical analysis/lexing)
- this is interleaved with parsing in older versions of Python but occurs
before parsing with the introduction of the PEG parser in Python 3.9
- parsing (syntactic analysis)
- in older versions of Python, there is a stage that checks assignment targets
- finally, runtime!
This is to demonstrate that Python actually does have compilation stages, and
errors that are directed at certain stages are detected BEFORE runtime. Not
everything is a runtime error in Python!
# License
Code is © 2023 Eddie Antonio Santos. Copying is subject to the terms of the
AGPL-3.0 license -- see `LICENSE` for details.