Skip to content

Cursing dunder methods fails with: KeyError: '<method_to_curse>' #61

@sgerodes

Description

@sgerodes
curse(str, '__eq__', str.__ne__)

fails with:
...

  File ".../python3.6/site-packages/forbiddenfruit/__init__.py", line 425, in curse
    _curse_special(klass, attr, value)
  File ".../python3.6/site-packages/forbiddenfruit/__init__.py", line 332, in _curse_special
    tp_as_name, impl_method = override_dict[attr]
KeyError: '__eq__'

Also other dunder methods fails. e.g.:

curse(int, '__new__', <some other method>)
curse(float, '__dict__', <some other method>)

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