You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The itertools.groupby implementation currently follows the standard library pure-python implementation. This heavily uses closures to share state between three interlocked async generator functions.
In the interest of maintainability, the code should be refactored with the goal of being more readable/understandable. Similar to other cases, prominently itertools.tee, a class based approach seems appropriate.
The text was updated successfully, but these errors were encountered:
The
itertools.groupby
implementation currently follows the standard library pure-python implementation. This heavily uses closures to share state between three interlocked async generator functions.This is confusing for code scanning (https://github.com/maxfischer2781/asyncstdlib/security/code-scanning/85, https://github.com/maxfischer2781/asyncstdlib/security/code-scanning/84) and admittedly for humans as well.
In the interest of maintainability, the code should be refactored with the goal of being more readable/understandable. Similar to other cases, prominently
itertools.tee
, a class based approach seems appropriate.The text was updated successfully, but these errors were encountered: