This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A really stupid python template language inspired by coffeekup, markaby. | |
Do not use this code, it will ruin your day. A byproduct of insomnia. | |
TL;DR | |
----- | |
This module defines a template language that allows us to do: | |
d = Doc() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from multiprocessing import Pool | |
from functools import partial | |
def _pickle_method(method): | |
func_name = method.im_func.__name__ | |
obj = method.im_self | |
cls = method.im_class | |
if func_name.startswith('__') and not func_name.endswith('__'): #deal with mangled names | |
cls_name = cls.__name__.lstrip('_') | |
func_name = '_' + cls_name + func_name |