RomeoDespres / reapy

A pythonic wrapper for REAPER's ReaScript Python API
MIT License
111 stars 25 forks source link

Add reapy.map function #117

Closed RomeoDespres closed 3 years ago

RomeoDespres commented 3 years ago

This pull request implements a new reapy.map function for efficiently mapping a function to iterables of arguments from outside REAPER.

It isolates this contribution from the rest of #81 where it was originally submitted.

RomeoDespres commented 3 years ago

@Levitanus I've moved the map function from ReapyObject to top-level (reapy.map). I've also changed the API a little but the features are the same. Hope you like it that way!

I've also tried my best to write a stub file reapy/core/map.pyi but I'm not entirely sure it's correct. Would you please share how you usually check for correctness of stub files? I would then be able to be more proactive in maintaining type hints.