Hacker News new | ask | show | jobs
Pointers.py: Bringing the hell of pointers to Python (github.com)
2 points by ScottWRobinson 1554 days ago
1 comments

Python already has this 'hell of pointers' in the ctypes module.

Where `to_ptr(x)` is:

  ptr = ctypes.pointer(ctypes.py_object(x))
And `ptr.dereference()` is:

  ptr.contents.value