https://github.com/ZeroIntensity/pointers.py Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} ZeroIntensity / pointers.py Public * Notifications * Fork 2 * Star 301 Bringing the hell of pointers to Python. pointerspy.netlify.app/ MIT License 301 stars 2 forks Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 0 tags Code Latest commit @ZeroIntensity ZeroIntensity i hate flake8 with a burning passion ... c4d14db Mar 20, 2022 i hate flake8 with a burning passion c4d14db Git stats * 34 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows hell yeah adding tests for joke library Mar 20, 2022 docs pretty much just edge case fixes Mar 20, 2022 src/pointers i hate flake8 with a burning passion Mar 20, 2022 tests docs and tests Mar 20, 2022 .gitignore a lot Mar 20, 2022 LICENSE inital commit Mar 9, 2022 README.md fix readme Mar 20, 2022 mkdocs.yml documentation Mar 19, 2022 netlify.toml netlify stuff Mar 19, 2022 pyproject.toml inital commit Mar 9, 2022 requirements.txt netlify stuff Mar 19, 2022 requirements_dev.txt hell yeah adding tests for joke library Mar 20, 2022 runtime.txt netlify stuff Mar 19, 2022 setup.cfg hell yeah adding tests for joke library Mar 20, 2022 setup.py pretty much just edge case fixes Mar 20, 2022 tox.ini it works on my machine Mar 20, 2022 View code [ ] pointers.py Bringing the hell of pointers to Python Example Example with malloc Why does this exist? Installation Linux/macOS Windows Running Documentation README.md pointers.py Tests Bringing the hell of pointers to Python Why would you ever need this * Documentation * Repository * PyPI Example from pointers import to_ptr, Pointer, decay a: str = '123' b: str = 'abc' @decay def move(ptr_a: Pointer[str], ptr_b: Pointer[str]): ptr_a <<= ptr_b move(a, b) print(a, b) # abc abc Example with malloc from pointers import malloc, free memory = malloc(52) memory <<= "abc" print(*memory) # abc free(memory) print(*memory) # MemoryError Why does this exist? The main purpose of pointers.py is to simply break the rules of Python, but has some other use cases: * Can help C/C++ developers get adjusted to Python * Provides a nice learning environment for programmers learning how pointers work * Makes it very easy to manipulate memory in Python * Why not? Installation Linux/macOS python3 -m pip install -U pointers.py Windows py -3 -m pip install -U pointers.py Running Documentation $ git clone https://github.com/ZeroIntensity/pointers.py && cd pointers.py $ pip install -U mkdocs $ mkdocs serve About Bringing the hell of pointers to Python. pointerspy.netlify.app/ Topics python pointers Resources Readme License MIT License Stars 301 stars Watchers 2 watching Forks 2 forks Releases No releases published Packages 0 No packages published Contributors 3 * @ZeroIntensity ZeroIntensity ZeroIntensity * @2231puppy 2231puppy Micha * @5HT2 5HT2 Languages * Python 100.0% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.