Skip to content

wrap(func) and wrap(func=func) give two different results (double_up_as_factory error?) #64

@thorwhalen

Description

@thorwhalen

When func is given as a keyword arg, the effect is different (it becomes a factory) than when given as a positional arg (which gives us the (correct) Wrap object.

Reproduce error:

from i2 import wrap

def foo(x):
    return x

wrap(foo)
# <i2.Wrap foo(x)>

wrap(func=foo)
# functools.partial(<function wrap at 0x10610a8c0>, func=<function foo at 0x173d17520>)

Note: The problem might be with double_up_as_factory, not wrap itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions