Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .spellcheck_exceptions_dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pycache
IndentationError
TabError
SyntaxError
datamodel
coroutines
lexemes
lexically
Expand Down Expand Up @@ -138,6 +137,7 @@ PyData


# urls:
datamodel
pkgs
readthedocs
src
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python 3.12.3
python 3.13.2
25 changes: 25 additions & 0 deletions 1_core_language/3_data_model/0_data_model.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
def data model:
- formal: ???

- in words: ???

- plain english: ???

- intuition: ???

- properties: ???

- examples: ???

- use cases:
- a means by which we can implement protocols(Powell, 2017)
the protocol meaning is determined by the specific type.
example:
- __add__ for a string means concatenate
- __add__ for a Polynomial means add the coefficients
- ...

- proof: ???

References:
Powell, J. 2017. What Does It Take To Be An Expert At Python. PyData
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
def object:
- formal: ???
- in words: ???

- plain english: Python's abstraction for data and code.

- intuition: ???

- properties:
- id
- value
- type
- implementation:
- cpython:
- PyTypeObject
- type system: https://typing.python.org/en/latest/spec/index.html

- operations:
- is: compares object identity
- id(object): returns an object's identity memory address(in cpython)

- implementation:
- cpython:
- id(object) = memory address
- examples: ???

- use cases: ???

- proof: ???

References: ???
Python Software Foundation. 2023. Objects, values and types. https://docs.python.org/3.12/reference/datamodel.html#objects-values-and-types
24 changes: 0 additions & 24 deletions 1_core_language/3_datamodel/0_def.txt

This file was deleted.

28 changes: 0 additions & 28 deletions 1_core_language/3_datamodel/1_objects_values_and_types/def.txt

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ def built-in types:
- intuition: ???

- properties:
- principle types:
- numerics
- sequences
- mappings
- classes
- instances
- exceptions
- all built-in type names in the STL https://docs.python.org/3/library/types.html#module-types

- examples: ???
Expand All @@ -16,5 +23,5 @@ def built-in types:

- proof: ???

References: ???

References:
The Python Standard Library. Built-in Types. https://docs.python.org/3/library/stdtypes.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ def type_annotation_types
- proof: ???

References:
- The Python Standard Library. 2025. Type Annotation Types. https://docs.python.org/3/library/stdtypes.html#type-annotation-types-generic-alias-union
The Python Standard Library. 2025. Type Annotation Types. https://docs.python.org/3/library/stdtypes.html#type-annotation-types-generic-alias-union
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/python:3
FROM python:3.13

WORKDIR /python

Expand Down
58 changes: 30 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
# Python
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![build status](https://github.com/praisetompane/python/actions/workflows/python.yaml/badge.svg) <br>

## Objectives
- An in-depth study of Python's:
- Interpreter.
- This focuses on [CPython](https://github.com/python/cpython).
- [CPython Source Code Layout](https://devguide.python.org/internals/exploring/)
- [Annotations on the actual interpreter implementation](https://github.com/praisetompane/python_implementation_study_cpython)
- They are prefixed with "Praise:"
- Python's design, implementation and ecosystem.
- Interpreter.
- This focuses on [CPython](https://github.com/python/cpython).
- [CPython Source Code Layout](https://devguide.python.org/internals/exploring/)
- [Style Guide](https://peps.python.org/pep-0008/)
- [Python](https://peps.python.org/pep-0007/)
- [C](https://peps.python.org/pep-0007/)
- [Annotations on the actual interpreter implementation](https://github.com/praisetompane/python_implementation_study_cpython)
- They are prefixed with "Praise:"
- Python's design, implementation and ecosystem.

## Language Details
- Language Specification: None
- [Compiler | Interpreter](https://github.com/python/cpython)
- [Bennett, J. 2019. See CPython run: Getting to know your Python interpreter. North Bay Python](https://www.youtube.com/watch?v=tzYhv61piNY)
- [Type System](https://typing.python.org/en/latest/spec/index.html)
- [Memory Model](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/pages/readings/python-cost-model/)
- [Language Reference](https://docs.python.org/3/reference/index.html)
- [Interpreter](https://github.com/python/cpython)
- [Bennett, J. 2019. See CPython run: Getting to know your Python interpreter. North Bay Python](https://www.youtube.com/watch?v=tzYhv61piNY)
- [Modules Index](https://docs.python.org/3/py-modindex.html)
- Memory Model:
- [Computational Complexity Cost Model](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/pages/readings/python-cost-model/)
- [Standard Library](https://docs.python.org/3/library/index.html)
- [Packaging and Distribution](https://packaging.python.org/en/latest/)
- [Package Index](https://pypi.org)
- [Python Packaging Authority](https://www.pypa.io/en/latest/)
- [The Hitchhiker’s Guide to Packaging](https://the-hitchhikers-guide-to-packaging.readthedocs.io/en/latest/)
- [Glossary](https://packaging.python.org/en/latest/glossary/)
- Tools:
- [pip](https://pip.pypa.io/en/stable/)
- [pipenv](https://pipenv.pypa.io/en/latest/)
- Structuring Projects
- ...
- [Packaging and Distribution]( https://www.pypa.io/en/latest/)
- [Core Module Index](https://docs.python.org/3/py-modindex.html)
- [Package Index](https://pypi.org)
- Tools:
- [pip](https://pip.pypa.io/en/stable/)
- [pipenv](https://pipenv.pypa.io/en/latest/)
- Structuring Projects:
- ...
- [Extending and Embedding](https://docs.python.org/3/extending/index.html)
- [PEP Index](https://www.python.org/dev/peps/)
- [PEP Index](https://www.python.org/dev/peps/)
- [Developer Contribution Guide](https://devguide.python.org/)
- [Glossary](https://docs.python.org/3/glossary.html)
- [History](https://docs.python.org/3/license.html)

## Community
- [Discord](https://discuss.python.org)
- [Glossary]
- [Language](https://docs.python.org/3/glossary.html)
- [Packaging](https://packaging.python.org/en/latest/glossary/)

## Use Cases
- [Applications of Python](https://www.python.org/about/apps/)
- [Style Guide](https://peps.python.org/pep-0008/)
- [Effective Application]

## Community
- [Discord](https://discuss.python.org)

## Learning Resources
- [roadmap](https://roadmap.sh/python)
Expand Down
13 changes: 11 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VERSION="3.13.2"
echo "Adding asdf python plugin"
asdf plugin add python
echo "Done"
Expand All @@ -10,9 +11,17 @@ if [ "$ostype" = "Linux" ]; then
fi

echo "Installing python"
asdf install python latest
asdf install python $VERSION
echo "Done"

echo "Set python version"
asdf set python latest
asdf set python $VERSION
echo "Done"

echo "Install pipenv"
pip install pipenv --user
echo "Done"

echo "Adding user binaries to system path"
echo 'export PATH="$PATH:~/.local/bin"' >> ~/.zshrc
echo "Done"
2 changes: 1 addition & 1 deletion spellcheck.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
matrix:
- name: All Files
- name: English
aspell:
lang: en
ignore-case: false
Expand Down