Skip to content

bind(self=xxx) fails #14

@rbtcollins

Description

@rbtcollins

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions