pycapi icon indicating copy to clipboard operation
pycapi copied to clipboard

Add `PyDict_Next` implementation

Open BlackCatDevel0per opened this issue 1 year ago • 0 comments

Hello, could you please add PyDict_Next to the library? I want to use this in OwO decorators and it's a very cool lib)

In short it works like this:

import pycapi

a = {'a': 1, 'b': 2}
b = {'a': 8, 'b': 5, 'c': 3}

item = pycapi.PyDict_Next(b, 2)  # Return tuple
print(item)
item = pycapi.PyDict_Next(a, 2)  # Return None if no such pos
print(item)

BlackCatDevel0per avatar Sep 22 '23 21:09 BlackCatDevel0per