0

I have been studying DSA and don't understand how ctypes.py_object works. As of my knowledge it works on concept of pointers to create an array of pointers that will store memory addresses for values to be added in dynamic array.

I have provided my code below:

def __create_array(self, space):
    return (space * ctypes.py_object)()

Basically, this function will create an array of pointer objects with memory addresses to store values in array.

3
  • What is “DSA”?. Commented Aug 31, 2024 at 21:14
  • ctypes.py_object represents C PyObject*. If you aren’t interfacing with Python C APIs, you don’t need it. Commented Aug 31, 2024 at 21:15
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Commented Aug 31, 2024 at 22:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.