Skip to main content

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

Running Documentation

$ git clone https://github.com/ZeroIntensity/pointers.py && cd pointers.py
$ pip install -U mkdocs
$ mkdocs serve

Project details


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.4.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pointers.py-1.1.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file pointers.py-1.1.4.tar.gz.

File metadata

  • Download URL: pointers.py-1.1.4.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for pointers.py-1.1.4.tar.gz
Algorithm Hash digest
SHA256 b6c06f81996d5500c14bdbadad9eb8c710c57dd02498dcb3a3ce2a682d6e52a0
MD5 a3a8b4e2fa88a4e256f0ba86857205ca
BLAKE2b-256 5d876585c7a2a6e2203b4f3d8706f3f7d366c6a22c2b2702c1db7fbf8a3b0ac7

See more details on using hashes here.

File details

Details for the file pointers.py-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: pointers.py-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for pointers.py-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fcd19f8a657aabffb6b1476eeaefcd4b9f6b3ce20623d667e1120ffdb7b854ad
MD5 603498eee232be5259bc3e94e880dddb
BLAKE2b-256 c28078e915776631361ced3a12e72e05e586980163cd0b2932650671ff809361

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page