Bringing the hell of pointers to Python.
Project description
pointers.py
Bringing the hell of pointers to Python
Why would you ever need this
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
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
Installation
Linux/macOS
python3 -m pip install -U pointers.py
Windows
py -3 -m pip install -U pointers.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pointers.py-1.1.3.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for pointers.py-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec228ba9a820452fe1689070c3a629b0e00c742f41045f7b213a9a64d0af479b |
|
MD5 | 2e30744877bf4799056cf453af72f41b |
|
BLAKE2b-256 | 0366be8199412ced5ad552e7461d3bdfb6af8ba9a353cc5ac793b110c2276536 |