Skip to content

Support partial with keyword arguments #13

@sdvillal

Description

@sdvillal

Currently the strings generated for partials over functions accepting keyword arguments are wrong, or better said, oververbose.

from whatami import what2id
from functools import partial

def f(x, **kwargs):
    return None

fp = partial(f, a=3)
print(what2id(fp))

# Prints:
#   partial(args=(),func=f(),keywords={'a':3})
# Should print:
#   f(a=3)

Also the whatable decorator fails.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions