1
0
forked from VimPlug/jedi

added functool mixins

This commit is contained in:
David Halter
2012-09-04 18:15:33 +02:00
parent b111c56b06
commit 268196086b
3 changed files with 41 additions and 1 deletions

9
mixin/_functools.py Normal file
View File

@@ -0,0 +1,9 @@
class partial():
def __init__(self, func, *args, **keywords):
self.__func = func
self.__args = args
self.__keywords = keywords
def __call__(self, *args, **kwargs):
# I know this doesn't work in Python, but Jedi can this ;-)
return self.__func(*self.__args, *args, **self.keywords, **kwargs)