Are there any best practices for the use of higher-level Python constructs such as threading.Condition
, and collections.deque
from modules written in C? In particular:
- Avoiding dict lookup costs, for methods and members
- Accessing parts of these constructs that are in C directly where possible
- When to reimplement desired functionality locally and not import from elsewhere in the standard library