Message 179356 - Python tracker
P = import_fresh_module('xml.etree.ElementTree', blocked=['_elementtree'])
tb = P.TreeBuilder(element_factory=lambda a, b: [a, b])
print(pickle.dumps(tb))
Gives: _pickle.PicklingError: Can't pickle <class 'function'>: attribute lookup builtins.function failed