-
-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
I wanted to suggest splitting the Python interface from the C-based code. Something like:
# hid.py
class Device:
# Regular Python class
def read():
# Regular Python method
hid_ex.read() # Use C-based function, generated from Cython
# hid_ex.pyx
def read(int ....):
# Cython function
Advantages:
- Documentation can be generated automatically (
hid_excould be simply mocked) - User IDEs have full code completion / suggestions, since they interface with regular (and by now well-documented) Python
- Development is made a little easier a recompile is not always necessary
Disadvantages:
- Speed or performance might be affected, though I'm sure not about it - Functionality remains in C-based Library, only an extra interface is added
I'm curious what you think.
Metadata
Metadata
Assignees
Labels
No labels