I want to add method for one class implemented by C
from lru import LRU
class A(LRU):
def foo(self):
print("a")
lru is a lib from https://github.com/amitdev/lru-dict
error:“type ‘type’ is not an acceptable base type”
I want to add method for one class implemented by C
from lru import LRU
class A(LRU):
def foo(self):
print("a")
lru is a lib from https://github.com/amitdev/lru-dict
error:“type ‘type’ is not an acceptable base type”
Writing Python's inheritable C/C++ types is contained in this PEP 253. Also, you have this guide that explains how to write inheritable types in C/C++.