3 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for Gribouillis

This snippet defines a simple decorator to post-process a function's return value through a sequence of filters. As a first application, the decorator can transform a generator function into a function returning a sequence type (list, tuple, dict).

Member Avatar for Gribouillis
2
569
Member Avatar for TrustyTony
Member Avatar for Archenemie
1
660
Member Avatar for Gribouillis

This snippet defines a function to merge sorted iterables containing similar items into a single iterable. Items are supposed to be sorted in ascending order. Only one item per iterable is stored at a time.

Member Avatar for Gribouillis
0
584

The End.