aliles / funcsigs

Python function signatures package for Python 2.6, 2.7 and 3.2+
http://pypi.python.org/pypi/funcsigs
Other
48 stars 33 forks source link

bind(self=xxx) fails #14

Open rbtcollins opened 9 years ago

rbtcollins commented 9 years ago

I have a method like so:

class F: def f(a, self): pass

signature(partial(F.f, None)).bind(self=10)

fails, due to receiving self too many times.

The function bind() can't be defined with self as its own parameter - it conflicts with binds that pass self in. Instead it needs to take _args, *_kwargs, and pull self out of args[0].

I'll throw up a patch in alittle, for now (in mock), I'm monkeypatching to fix it.