2 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for cwarn23

In these three functions, you can filter to a url to just the domain name. There are three main methods of doing so which are all shown in the example and the usage of each function is shown in the example.

Member Avatar for diafol
0
708
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

The End.