Skip to content

rcurry and similar functions do not work with methods of built-in types #108

Open
@ErisianArchitect

Description

@ErisianArchitect
>>> has_suffix = rcurry(str.endswith)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\funcy\funcs.py", line 57, in rcurry
    n = get_spec(func).max_n
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\funcy\_inspect.py", line 108, in get_spec
    mod = func.__module__
AttributeError: 'method_descriptor' object has no attribute '__module__'. Did you mean: '__reduce__'?```

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions