Cursing int with __iter__ fails with an error
toxicrecker opened this issue · 1 comments
toxicrecker commented
Python 3.8.3
Code -
from forbiddenfruit import curse
def __iter__(self):
return iter(range(self))
curse(int, "__iter__", __iter__)
Output -
forbiddenfruit/__init__.py", line 329, in _curse_special
tp_as_name, impl_method = override_dict[attr]
KeyError: '__iter__'
RadiantUwU commented
This issue will be fixed once my pull request is accepted and merged, till then you can use the package from the pull request of mine with __iter__
integrated