Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Inconsistency in behavior of functools.partial and makefun.partial #95

Open
@elchupanebrej

Description

There is function

def func(a):
 print(f"Arg: {a}")

When it is used by functiools.partial:

from functools import partial
partial(partial(func, a=1), a=2)()
"""
>>> Arg: 2
"""

When it is used by makefun.partial:

from makefun import partial as mpartial
mpartial(mpartial(func, a=1), a=2)()
"""
>>> Arg: 1
"""

So makefun.partial could not be drop-in replacement for functools.partial

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

        AltStyle によって変換されたページ (->オリジナル) /